IB Statements/cryptocreatehash
From CometWiki
< IB Statements(Difference between revisions)
(New page: = CryptoCreateHash = Hash$ = CryptoCreateHash(Algorithm$, DataToHash$)) |
|||
(2 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
- | + | '''CryptoCreateHash function''' | |
- | + | '''Syntax:''' result-string = CryptoCreateHash(Algorithm$, Message$) | |
+ | |||
+ | '''Discussion:''' The CryptoCreateHash function produces a binary (non-printable) hash string of the supplied message data using the specified hashing algorithm. The CryptoCreateHash function currently supports 2 hashing algorithms, [http://en.wikipedia.org/wiki/SHA-1 SHA1] and [http://en.wikipedia.org/wiki/MD5 MD5]. The length of the result-string is determined by the algorithm used as follows: | ||
+ | |||
+ | "SHA1" - 160 bits (20 bytes) | ||
+ | |||
+ | "MD5" - 128 bits (16 bytes) | ||
+ | |||
+ | |||
+ | '''History:''' This function is available in Comet32 only. | ||
+ | |||
+ | '''Example:''' | ||
+ | |||
+ | LENGTH 20 & LOCAL Hash$ ! SHA1 generates a 160 bit (20 byte) result | ||
+ | |||
+ | Hash$ = CryptoCreateHash("SHA1", "Message to hash") |
Latest revision as of 00:56, 7 June 2010
CryptoCreateHash function
Syntax: result-string = CryptoCreateHash(Algorithm$, Message$)
Discussion: The CryptoCreateHash function produces a binary (non-printable) hash string of the supplied message data using the specified hashing algorithm. The CryptoCreateHash function currently supports 2 hashing algorithms, SHA1 and MD5. The length of the result-string is determined by the algorithm used as follows:
"SHA1" - 160 bits (20 bytes)
"MD5" - 128 bits (16 bytes)
History: This function is available in Comet32 only.
Example:
LENGTH 20 & LOCAL Hash$ ! SHA1 generates a 160 bit (20 byte) result Hash$ = CryptoCreateHash("SHA1", "Message to hash")