npm.io
2.0.3 • Published 2 years ago

@types/noise-curve-ed

Licence
MIT
Version
2.0.3
Deps
1
Size
4 kB
Vulns
0
Weekly
0
Stars
51.3K

Installation

npm install --save @types/noise-curve-ed

Summary

This package contains type definitions for noise-curve-ed (https://github.com/chm-diederichs/noise-curve-ed#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/noise-curve-ed.

index.d.ts

/// <reference types="node" />

export const DHLEN: 32;
export const PKLEN: 32;
export const SCALARLEN: 32;
export const SKLEN: 64;
export const ALG: "Ed25519";
export const name: typeof ALG;

/**
 * Generate a new keypair.
 */
export function generateKeyPair(privKey?: Buffer | Uint8Array): KeyPair;
/**
 * Perform DH between `publicKey` and `secretKey`/`scalar`.
 */
export function dh(publicKey: Buffer | Uint8Array, secretKey: SecretKey): Buffer | Uint8Array;

export interface KeyPair {
    publicKey: Buffer | Uint8Array;
    secretKey: Buffer | Uint8Array;
}

export interface SecretKey {
    scalar?: Buffer | Uint8Array;
    secretKey: Buffer | Uint8Array;
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 0939 GMT
  • Dependencies: @types/node

Credits

These definitions were written by BendingBender.