mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
15 lines
313 B
TypeScript
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;
|
|
});
|