password
password(
pwd):Hash32
Defined in: src/Hash.ts:141
Compute the persistent hash of a password string.
Convenience function that converts the string to bytes32 and hashes it.
Equivalent to bytes32(stringToBytes32(password)).
Parameters
pwd
string
Returns
The hash as a 32-byte Uint8Array
Example
const passwordHash = Midday.Hash.password('my-secret-password');// Use as initial ledger value in contract initawait contract.actions.init(passwordHash);Since
0.3.0