Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tweetnacl-auth

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tweetnacl-auth

HMAC-SHA-512-256 based on TweetNaCl.js

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
717
decreased by-38.24%
Maintainers
1
Weekly downloads
 
Created
Source

HMAC-SHA-512-256 for TweetNacl.js

Implementation of http://nacl.cr.yp.to/auth.html (requires TweetNaCl.js).

Written in 2014 by Dmitry Chestnykh. Public domain.

Build Status

Installation

Via NPM:

$ npm install tweetnacl-auth

Via Bower:

$ bower install tweetnacl-auth

or just download nacl-auth.js or nacl-auth.min.js and include it after TweetNaCl.js:

<script src="nacl.min.js"></script>
<script src="nacl-auth.min.js"></script>

Usage

nacl.auth(message, key)

Authenticates the given message with the secret key. (In other words, returns HMAC-SHA-512-256 of the message under the key.)

nacl.auth.full(message, key)

Returns HMAC-SHA-512 (without truncation) of the message under the key

nacl.auth.authLength = 32

Length of authenticator returned by nacl.auth.

nacl.auth.authFullLength = 64

Length of authenticator returned by nacl.auth.full.

nacl.auth.keyLength = 32

Length of key for nacl.auth and nacl.auth.full (key length is currently not enforced).

Keywords

FAQs

Package last updated on 30 Jul 2014

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc