DefinitelyTyped/types/scryptsy/scryptsy-tests.ts
2017-12-24 11:46:48 +07:00

15 lines
313 B
TypeScript

import scrypt = require('scryptsy');
const key = 'TheKey';
const salt = 'Salty';
// Test without processCallback
const data: Buffer = scrypt(key, salt, 16384, 8, 1, 64);
// Test with processCallback
scrypt(key, salt, 16384, 8, 1, 64, (status) => {
status.current;
status.total;
status.percent;
});