Exemple #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);
     }
 }
 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;
     }
 }