Fix missing require for crypto on SEA.work

This commit is contained in:
Gilbert Consellado 2018-06-07 07:30:18 +08:00
parent aca0497fd5
commit 1a99f74b86

1
sea.js
View File

@ -287,6 +287,7 @@
return r; return r;
} }
// For NodeJS crypto.pkdf2 rocks // For NodeJS crypto.pkdf2 rocks
const crypto = require('crypto')
const hash = crypto.pbkdf2Sync( const hash = crypto.pbkdf2Sync(
data, data,
new shim.TextEncoder().encode(salt), new shim.TextEncoder().encode(salt),