mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-04-28 05:47:52 +00:00
12 lines
293 B
JavaScript
12 lines
293 B
JavaScript
import bcrypt from 'bcryptjs'
|
|
|
|
|
|
self.onmessage = function (e) {
|
|
const { hashBase64, salt } = e.data;
|
|
try {
|
|
const result = bcrypt.hashSync(hashBase64, salt);
|
|
self.postMessage({ result });
|
|
} catch (error) {
|
|
self.postMessage({ error: error.message });
|
|
}
|
|
}; |