Skip to content
This repository has been archived by the owner on Mar 28, 2018. It is now read-only.

Latest commit

 

History

History
47 lines (26 loc) · 1.8 KB

API.md

File metadata and controls

47 lines (26 loc) · 1.8 KB

Table of Contents

primea-message

index.js:11-91

This implements Messages for Primea

serialize

index.js:40-48

serializes the message

Returns Buffer

deserialize

index.js:55-69

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

hash

index.js:76-82

Gets the SHA-256 hash for some given data

Parameters

  • data Buffer the data to be hashed
  • length number the number of bytes of the hash to return. must be <= 32 (optional, default 32)

Returns Promise resolves with 32 bytes of hashed data