/// <summary> /// SHA1 /// </summary> /// <returns>Mensagem encriptada</returns> public static string CreateHash(string mensagemoriginal) { return(Cryptographer.CreateHash("SHA1Managed", mensagemoriginal)); }
public static byte[] SHACreateHash(byte[] plainText) { return(Cryptographer.CreateHash(SHAProviderName, plainText)); }
public static string HashEncrypt(string input) { string hashed = Cryptographer.CreateHash(HashKey, input); return(hashed); }
/// <summary> /// 创建HASH方式加密字符串 /// </summary> /// <param name="hashName">HASH加密方式</param> /// <param name="encrytData">需要加密的字符串</param> /// <returns>加密字符串</returns> public static string CreateHash(string hashName, string encrytData) { return(Cryptographer.CreateHash(hashName, encrytData)); }
public static string SHACreateHash(string plainText) { return(Cryptographer.CreateHash(SHAProviderName, plainText)); }
public void CompareHashWithZeroLengthInstanceStringThrows() { string hash = Cryptographer.CreateHash(hashInstance, plainTextString); Cryptographer.CompareHash(string.Empty, plainTextString, hash); }
public string CreateHashOnMD5Cng(string plainValue) { return(Cryptographer.CreateHash("MD5CngCrypto", plainValue)); }
public void CreateHashWithZeroLengthInstanceStringThrows() { Cryptographer.CreateHash(string.Empty, plainTextString); }
public void CompareHashWithNullInstanceThrows() { byte[] hash = Cryptographer.CreateHash(hashInstance, plainTextBytes); Cryptographer.CompareHash(null, plainTextBytes, hash); }
public void CreateHashWithNullInstanceThrows() { Cryptographer.CreateHash(null, plainTextBytes); }
public void CreateHashWithNullInstanceStringThrows() { Cryptographer.CreateHash(null, plainTextString); }
public static string CreateHash(string texto) { string textoHash = Cryptographer.CreateHash(HashProviderName, texto); return(textoHash); }
public string CreateHash(string value) { return(Cryptographer.CreateHash("HashProvider", value, this.ConfigurationContext)); }
public byte[] CreateHash(byte[] value) { return(Cryptographer.CreateHash("HashProvider", value, this.ConfigurationContext)); }
public void CompareHashWithZeroLengthInstanceThrows() { byte[] hash = Cryptographer.CreateHash(hashInstance, plainTextBytes); Cryptographer.CompareHash(string.Empty, plainTextBytes, hash); }
public void CreateHashBytes() { byte[] hash = Cryptographer.CreateHash(hashInstance, plainTextBytes, context); Assert.IsFalse(CryptographyUtility.CompareBytes(plainTextBytes, hash)); }
public void CompareHashWithNullInstanceStringThrows() { string hash = Cryptographer.CreateHash(hashInstance, plainTextString); Cryptographer.CompareHash(null, plainTextString, hash); }
public void CreateHashString() { string hashString = Cryptographer.CreateHash(hashInstance, plainTextString, context); Assert.IsFalse(plainTextString == hashString); }
public void CreateHashWithInvalidInstanceThrows() { Cryptographer.CreateHash("invalid instance", plainTextString); }
/// <summary> /// Cria o hash SHA1Managed. /// </summary> /// <param name="plaintext"></param> /// <returns></returns> public static string CreateHash(string plaintext) { return(Cryptographer.CreateHash("SHA1Managed", plaintext.ToLower())); }