Socket
Socket
Sign inDemoInstall

@rabbit-company/blake2b

Package Overview
Dependencies
1
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @rabbit-company/blake2b

Blake2b-512 hash function


Version published
Weekly downloads
18
decreased by-28%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Blake2b-JS

Blake2b-512 implementation in JavaScript (ES6).

Usage

1. Download library

npm i --save @rabbit-company/blake2b

2. Import library

import Blake2b from "@rabbit-company/blake2b";

3. Hash

/*

  Parameters:
  1. Message (String or Uint8Array)
  2. Secret (String or Uint8Array | undefined) <>
  3. Length (Int) <64> (Min = 0 and Max = 64)
  4. Salt (String or Uint8Array) <> (String with length 16 or Uint8Array)
  5. Personal (String or Uint8Array) <> (String with length 16 or Uint8Array)

*/

// Generate hash from the provided message
Blake2b.hash("message");

// Generate hash from the provided message and secret key
Blake2b.hash("message", "secretKey");

// Generate hash from the provided message, secret key and length
Blake2b.hash("message", "secretKey", 32);

// Generate hash from the provided message, secret key, length and salt
Blake2b.hash("message", "secretKey", 32, "c32df5f2f3c77a03");

// Generate hash from the provided message, secret key, length, salt and personal
Blake2b.hash("message", "secretKey", 32, "c32df5f2f3c77a03", "4862f0260a9803da");

Keywords

FAQs

Last updated on 04 Feb 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc