You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-15 23:00:36 +02:00
API: Added more API calls
This commit is contained in:
@ -213,6 +213,11 @@ class EncryptionService {
|
||||
sjcl.random.addEntropy(hexSeed, 1024, 'shim.randomBytes');
|
||||
}
|
||||
|
||||
async randomHexString(byteCount) {
|
||||
const bytes = await shim.randomBytes(byteCount);
|
||||
return bytes.map((a) => { return hexPad(a.toString(16), 2); }).join('');
|
||||
}
|
||||
|
||||
async generateMasterKey(password) {
|
||||
const bytes = await shim.randomBytes(256);
|
||||
const hexaBytes = bytes.map((a) => { return hexPad(a.toString(16), 2); }).join('');
|
||||
|
Reference in New Issue
Block a user