コード例 #1
0
 private static byte[] Salsa20(byte[] iv, byte[] key, byte[] data)
 {
     using (ICryptoTransform transform = new Salsa20().CreateEncryptor(key, iv))
     {
         var outputBuffer = new byte[0x20];
         transform.TransformBlock(data, 0, data.Length, outputBuffer, 0);
         return(outputBuffer);
     }
 }
コード例 #2
0
 private static byte[] Salsa20(byte[] iv, byte[] key, byte[] data)
 {
     using (ICryptoTransform transform = new Salsa20().CreateEncryptor(key, iv))
     {
         var outputBuffer = new byte[0x20];
         transform.TransformBlock(data, 0, data.Length, outputBuffer, 0);
         return outputBuffer;
     }
 }