public virtual string Decrypt(string base64Text) { if (!this._encryptionOptions.Encrypt) { return(base64Text); } return(CryptographyUtils.Decrypt(this._algorithm, base64Text, this._encryptionOptions.InternalKey)); }
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); }
public CryptoSym(string key) { this._encryptionOptions = new CryptoConfig(true, key); this._algorithm = CryptographyUtils.CreateSymmAlgoTripleDes(); }
public CryptoHash() { this._encryptionOptions = new CryptoConfig(); this._algorithm = CryptographyUtils.CreateHashAlgoMd5(); }