This implements Messages for Primea
serializes the message
Returns Buffer
deserializes the message and returns a new instance of Message
Parameters
raw
Buffer the serialized raw message
Returns Promise resolve with a new instance of Message
Gets the SHA-256 hash for some given data
Parameters
data
Buffer the data to be hashedlength
number the number of bytes of the hash to return. must be <= 32 (optional, default32
)
Returns Promise resolves with 32 bytes of hashed data