@plugnet/util-crypto
Version:
A collection of useful crypto utilities for @plugnet
17 lines (16 loc) • 519 B
TypeScript
import { Keypair } from '../../types';
/**
* @name naclKeypairFromSecret
* @summary Creates a new public/secret keypair from a secret.
* @description
* Returns a object containing a `publicKey` & `secretKey` generated from the supplied secret.
* @example
* <BR>
*
* ```javascript
* import { naclKeypairFromSecret } from '@plugnet/util-crypto';
*
* naclKeypairFromSecret(...); // => { secretKey: [...], publicKey: [...] }
* ```
*/
export default function naclKeypairFromSecret(secret: Uint8Array): Keypair;