Skip to content

Hash

Calculates the hash of a secret for use in phased transactions with voting model 5 (Vote By Secret).

Request:

  • requestType is hash
  • hashAlgorithm is the hash function used: 2 for SHA256, 3 for SHA3, 5 for SCRYPT, 6 for RIPEMD160, 25 for Keccack25 and 62 for SHA256 followed by RIPEMD160, according to Get Constants
  • secret is a secret phrase in text form or hex string form
  • secretIsText is true if secret is text, false if it is a hex string (optional)

Response:

  • hash (S) is the hash of the secret, in the form of a hex string
  • requestProcessingTime (N) is the API request processing time (in millisec)