Пример #1
0
        public string GetTextEncrypted(string text)
        {
            Encryptor encryptor = new Encryptor(EncryptionAlgorithm.TripleDes);

            byte[] bytes1 = Encoding.UTF8.GetBytes(text);
            byte[] bytes2 = encryptor.Encrypt(bytes1, this.key);
            return(HexEncoding.ToString(encryptor.IV) + HexEncoding.ToString(bytes2));
        }