mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-04-26 02:57:58 +00:00
chore: update to version 14.0.11 and align website URLs
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.ed25519PairFromString = ed25519PairFromString;
|
||||
const util_1 = require("@pezkuwi/util");
|
||||
const asU8a_js_1 = require("../../blake2/asU8a.js");
|
||||
const fromSeed_js_1 = require("./fromSeed.js");
|
||||
/**
|
||||
* @name ed25519PairFromString
|
||||
* @summary Creates a new public/secret keypair from a string.
|
||||
* @description
|
||||
* Returns a object containing a `publicKey` & `secretKey` generated from the supplied string. The string is hashed and the value used as the input seed.
|
||||
* @example
|
||||
* <BR>
|
||||
*
|
||||
* ```javascript
|
||||
* import { ed25519PairFromString } from '@pezkuwi/util-crypto';
|
||||
*
|
||||
* ed25519PairFromString('test'); // => { secretKey: [...], publicKey: [...] }
|
||||
* ```
|
||||
*/
|
||||
function ed25519PairFromString(value) {
|
||||
return (0, fromSeed_js_1.ed25519PairFromSeed)((0, asU8a_js_1.blake2AsU8a)((0, util_1.stringToU8a)(value)));
|
||||
}
|
||||
Reference in New Issue
Block a user