CryptoHash Object
Overview
Member List
Properties
Specifies the effective size of an RC2 key. Applying this property to a key of any cipher other than RC2 will throw an error. Returns a CryptoBlob object containing the result of a one-way hash function.
As of Version 2.9, can be used to populate this CryptoHash object with a value. In versions prior to 2.9, this property was read-only.
Methods
Adds the content of a blob specified by Blob to the hash object. This function can be called multiple times before the result hash value is retrieved via the Value property.
Return Value: a CryptoBlob containing the decrypted buffer.
Usage:
Hash.AddBinary blobRelated Section: 3.4 Computing Hash Function of Files.
Adds the content of a file specified by Path to the hash object. This function can be called multiple times before the result hash value is retrieved via the Value property.
Usage:
Hash.AddFile "c:\myfile.txt"Related Section: 3.4 Computing Hash Function of Files.
Adds Text to the hash object. This function can be called multiple times before the result hash value is retrieved via the Value property.
Usage:
Hash.AddText "my text"Related Section: 3.2 Computing Hash with AspEncrypt.
Derives a symmetric cryptographic key from the hash. Algorithm specifies the encryption algorithm for the key being generated. BitSize specifies the key size. For the description of these arguments, see the comments to CryptoContext's GenerateKey method.
Return Value: a CryptoKey object containing the newly generated key.
Usage:
Set Key = Hash.DeriveKey
Clears the CryptoHash object so that a new hash can be computed.
Return Value: a CryptoKey object containing the newly generated key.
Usage:
Hash.ResetRelated Section: 3.2 Computing Hash with AspEncrypt.
Generates a digital signature by encrypting the underlying hash value with a private key pertaining to the context used to create this hash object. If KeyExchange is True, the key-exchange key will be used. Otherwise, the singature key will be used.
Return Value: a CryptoBlob object containing signature blob.
Usage:
Set Blob = Hash.Sign( True )Related Section: 6.3 Creating and Verifying Digital Signatures.
Verifies the specified Signature blob by decrypting it with the specified public Key and comparing the decrypted value with the underlying hash.
Return Value: True if the signature is verified, False otherwise.
Usage:
If Hash.VerifySignature( Blob, Key ) Then ...Related Section: 6.3 Creating and Verifying Digital Signatures.