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)
Note: secret is converted from a hex string to a byte array, which is what the hash algorithm expects, unless secretIsText is true, in which case secret is first converted from text to a UTF-8 hex string as by Hex Convert.
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)
Converts an ID to the signed long integer representation used internally.
Request:
requestType is longConvert
id is a numerical ID, in decimal form but equivalent to an 8-byte unsigned integer as produced by SHA-256 hashing
Response:
stringId (S) is the numerical ID
longId (S) is the signed long integer (8-bytes) representation of the ID used internally, returned as a string
requestProcessingTime (N) is the API request processing time (in millisec)
Note: Java does not support unsigned integers, so any unsigned ID (such as a block ID) visible in the NRS client is represented internally as a signed integer.