Encrypt() public method

Encrypts specified data.
public Encrypt ( byte data ) : byte[]
data byte
return byte[]
示例#1
0
        /// <summary>
        /// Encrypts specified text using UTF-8 as its binary representation.
        /// </summary>
        public static string Encrypt(string text)
        {
            var input  = Encoding.UTF8.GetBytes(text);
            var output = s_encryptor.Encrypt(input);

            return(Convert.ToBase64String(output));
        }