Exemple #1
0
        public byte[] Encrypt(byte[] input)
        {
            int len = input.Length;

            byte[] output = new byte[len];
            NativeEncryption.TwofishEncrypt(ref obj, input, output, len);
            return(output);
        }
Exemple #2
0
 public byte[] Encrypt(byte[] input, int len)
 {
     if (input.Length < len)
     {
         throw new ArgumentOutOfRangeException("len", "Requested data lenght is larger than specified buffer.");
     }
     byte[] output = new byte[len];
     NativeEncryption.TwofishEncrypt(ref obj, input, output, len);
     return(output);
 }