
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@types/xsalsa20
Advanced tools
TypeScript definitions for xsalsa20
npm install --save @types/xsalsa20
This package contains type definitions for xsalsa20 (https://github.com/mafintosh/xsalsa20).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/xsalsa20.
/// <reference types="node" />
export = XSalsa20;
declare const XSalsa20: XSalsa20.XSalsa20;
declare namespace XSalsa20 {
interface XSalsa20 {
/**
* Bytes required for the nonce buffer.
*/
readonly NONCEBYTES: number;
/**
* Bytes required for the key buffer.
*/
readonly KEYBYTES: number;
/**
* Create a new xor instance.
*
* @param nonce Should be 24 bytes.
* @param key Should be 32 bytes.
*/
(nonce: Uint8Array | Buffer, key: Uint8Array | Buffer): Xor;
/**
* Create a new xor instance.
*
* @param nonce Should be 24 bytes.
* @param key Should be 32 bytes.
*/
new(nonce: Uint8Array | Buffer, key: Uint8Array | Buffer): Xor;
}
interface Xor {
/**
* Update the xor instance with a new input buffer. Optionally you can pass in an output buffer.
*
* @example
* import * as crypto from 'crypto';
* import xsalsa20 = require('xsalsa20');
*
* const key = crypto.randomBytes(xsalsa20.KEYBYTES);
* const nonce = crypto.randomBytes(xsalsa20.NONCEBYTES);
*
* const xor = xsalsa20(nonce, key);
*
* console.log(xor.update(Buffer.from('hello')));
* console.log(xor.update(Buffer.from('world')));
*
* xor.finalize();
*/
update<TOut extends Uint8Array | Buffer = Uint8Array>(input: Uint8Array | Buffer, output?: TOut): TOut;
/**
* Clears internal state. Call this method last.
*/
finalize(): void;
}
}
These definitions were written by BendingBender.
FAQs
TypeScript definitions for xsalsa20
We found that @types/xsalsa20 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.