Пример #1
0
 public static CryptedString Crypt(CryptedString buffer, CryptedString key, CryptedString iv, bool encrypt = true, string algorithm = "aes", string encoding = "utf-8")
 {
     return(new CryptedString(
                ByteCrypt.Crypt(
                    buffer.GetBytes(),
                    key.GetBytes(),
                    iv.GetBytes(),
                    encrypt,
                    algorithm
                    )
                ));
 }
Пример #2
0
        public static CryptedString Crypt(CryptedString buffer, CryptedString key, CryptedString iv, bool encrypt = true, string algorithm = "aes", string encoding = "utf-8")
        {

            return new CryptedString(
                        ByteCrypt.Crypt(
                            buffer.GetBytes(),
                            key.GetBytes(),
                            iv.GetBytes(),
                            encrypt,
                            algorithm
                        )
                );

        }