How to use the js-sha256.sha256.arrayBuffer function in js-sha256

To help you get started, we’ve selected a few js-sha256 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github decentralized-identity / did-jwt / src / Verifier.js View on Github external
function hash (jwt) {
    const parts = jwt.match(/^([a-zA-Z0-9_-]+\.[a-zA-Z0-9_-]+)\./)
    return Buffer.from(sha256.arrayBuffer(parts[1]))
  }
github decentralized-identity / did-jwt / src / Signer.js View on Github external
function hash (payload) {
    return Buffer.from(sha256.arrayBuffer(payload))
  }
github decentralized-identity / did-jwt / src / Digest.js View on Github external
export function sha256 (payload) {
  return Buffer.from(sha256js.arrayBuffer(payload))
}