/// <summary> /// The TPM always signs hash-sized data. This version of the VerifySignature /// performs the necessary hashing operation over arbitrarily-length data and /// verifies that the hash is properly signed. /// </summary> /// <param name="data"></param> /// <param name="sig"></param> /// <returns></returns> public bool VerifySignatureOverData(byte[] data, ISignatureUnion sig) { using (AsymCryptoSystem verifier = AsymCryptoSystem.CreateFrom(this)) { return(verifier.VerifySignatureOverData(data, sig)); } }
/// <summary> /// The TPM always signs hash-sized data. This version of the VerifySignature performs the necessary /// hash operation over arbitrarily-length data and verifies that the hash is properly signed /// (i.e. the library performs the hash) /// </summary> /// <param name="signedData"></param> /// <param name="signature"></param> /// <returns></returns> public bool VerifySignatureOverData(byte[] signedData, ISignatureUnion signature, TpmAlgId sigHashAlg = TpmAlgId.Null) { using (AsymCryptoSystem verifier = AsymCryptoSystem.CreateFrom(this)) { bool sigOk = verifier.VerifySignatureOverData(signedData, signature, sigHashAlg); return(sigOk); } }