/// <summary> /// Verifies the hash and signature of an object /// </summary> /// <param name="SigningPublicCert"></param> /// <returns>Returns TRUE if the hash and signature verify correctly</returns> public bool Verify(Cert SigningPublicCert, out string Reason) { return(ComputedHash.Verify(GetHashableData(), out Reason, SigningPublicCert)); }
public bool Verify(Cert SigningPublicCert) { string n = null; return(ComputedHash.Verify(GetHashableData(), out n, SigningPublicCert)); }
/// <summary> /// Computes a hash from a string /// </summary> /// <param name="FromString">The string to hash</param> /// <param name="Provider">The provider to hash with</param> /// <param name="SigningCert">Optional cert to sign with</param> /// <returns>A new Hash object</returns> public static Hash Compute(string FromString, HashProvider Provider, Cert SigningCert = null) { UnicodeEncoding UE = new UnicodeEncoding(); return(Compute(UE.GetBytes(FromString), Provider, SigningCert)); }
/// <summary> /// Compute a hash for this object and optionally signs it /// </summary> /// <param name="Provider">The hash provider to use</param> /// <param name="SigningCert">If provided the cert to sign the hash with</param> public void ComputeHash(Hash.HashProvider Provider, Cert SigningCert = null) { ComputedHash = Hash.Compute(GetHashableData(), Provider, SigningCert); }
/// <summary> /// Checks if the hash is structurally valid, does not validate the actual hash /// </summary> public bool HashLengthValid(Cert SigningCert = null) { var r = ""; return(HashLengthValid(out r, SigningCert)); }