sha1prng
Version:
A lib for compatible with sun.security.provider.SecureRandom.
29 lines (19 loc) • 411 B
Markdown
A lib for compatible with sun.security.provider.SecureRandom.
npm:
```shell
$ npm install --save sha1prng
```
or yarn:
```shell
$ yarn add sha1prng
```
```javascript
const hash = require('sha1prng');
const secretKey = 'xxxxxxxxxxxxxxxx';
const hashKey = hash.sha1prng(secretKey);
console.log('Buffer:', hashKey);
console.log('Hex:', hashKey.toString('hex'));
```