public virtual string Encrypt(string plaintext) { if (!this._encryptionOptions.Encrypt) { return(plaintext); } return(CryptographyUtils.Encrypt(this._algorithm, plaintext, this._encryptionOptions.InternalKey)); }
public string Encrypt(string plaintext) { if (!this._encryptionOptions.Encrypt) { return(plaintext); } return(CryptographyUtils.Encrypt(this._algorithm, plaintext)); }
public static bool IsHashMatch(HashAlgorithm hashAlgorithm, string hashedText, string unhashedText) { string strB = CryptographyUtils.Encrypt(hashAlgorithm, unhashedText); return(string.Compare(hashedText, strB, false) == 0); }