New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@stablelib/xchacha20

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stablelib/xchacha20 - npm Package Compare versions

Comparing version 0.1.1 to 1.0.0

8

lib/xchacha20.d.ts

@@ -25,7 +25,7 @@ /**

/**
* Applies the HChaCha core function to 16-byte input,
* 32-byte key key, and puts the result into 64-byte array out.
* This function is used to generate the first subkey based on
* the first 16 bytes of the nonce and the key.
* HChaCha is a one-way function used in XChaCha to extend nonce.
*
* It takes 32-byte key and 16-byte src and writes 32-byte result
* into dst and returns it.
*/
export declare function hchacha(key: Uint8Array, src: Uint8Array, dst: Uint8Array): Uint8Array;

@@ -5,2 +5,5 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
/**
* Package xchacha20 implements XChaCha20 stream cipher.
*/
var binary_1 = require("@stablelib/binary");

@@ -24,3 +27,3 @@ var wipe_1 = require("@stablelib/wipe");

if (nonce.length !== 24) {
throw new Error("XChacha20 nonce must be 24 bytes");
throw new Error("XChaCha20 nonce must be 24 bytes");
}

@@ -59,6 +62,6 @@ // Use HChaCha one-way function to transform first 16 bytes of

/**
* Applies the HChaCha core function to 16-byte input,
* 32-byte key key, and puts the result into 64-byte array out.
* This function is used to generate the first subkey based on
* the first 16 bytes of the nonce and the key.
* HChaCha is a one-way function used in XChaCha to extend nonce.
*
* It takes 32-byte key and 16-byte src and writes 32-byte result
* into dst and returns it.
*/

@@ -65,0 +68,0 @@ function hchacha(key, src, dst) {

{
"name": "@stablelib/xchacha20",
"version": "0.1.1",
"version": "1.0.0",
"description": "XChaCha20 stream cipher",

@@ -25,11 +25,11 @@ "main": "./lib/xchacha20.js",

"dependencies": {
"@stablelib/binary": "^0.7.2",
"@stablelib/chacha": "^0.7.2",
"@stablelib/wipe": "^0.5.0"
"@stablelib/binary": "^1.0.0",
"@stablelib/chacha": "^1.0.0",
"@stablelib/wipe": "^1.0.0"
},
"devDependencies": {
"@stablelib/benchmark": "^0.5.0",
"@stablelib/hex": "^0.5.0"
"@stablelib/benchmark": "^1.0.0",
"@stablelib/hex": "^1.0.0"
},
"gitHead": "dd08cfe89bc89b4106f0c9705db6281dd7357b26"
"gitHead": "c3b9e138650642a738a9225956c75dbe44c76ae6"
}
// Copyright (C) 2019 Kyle Den Hartog
// MIT License. See LICENSE file for details.
/**
* Package xchacha20 implements XChaCha20 stream cipher.
*/
import { writeUint32LE } from "@stablelib/binary";

@@ -25,3 +29,3 @@ import { wipe } from "@stablelib/wipe";

if (nonce.length !== 24) {
throw new Error("XChacha20 nonce must be 24 bytes");
throw new Error("XChaCha20 nonce must be 24 bytes");
}

@@ -66,8 +70,7 @@

/**
* Applies the HChaCha core function to 16-byte input,
* 32-byte key key, and puts the result into 64-byte array out.
* This function is used to generate the first subkey based on
* the first 16 bytes of the nonce and the key.
* HChaCha is a one-way function used in XChaCha to extend nonce.
*
* It takes 32-byte key and 16-byte src and writes 32-byte result
* into dst and returns it.
*/
export function hchacha(

@@ -74,0 +77,0 @@ key: Uint8Array,

Sorry, the diff of this file is not supported yet

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