You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-16 00:14:34 +02:00
Desktop: Add an option to renew the API token (#4811)
This commit is contained in:
committed by
GitHub
parent
e3efe70bab
commit
2fc9c53ff0
@ -254,6 +254,10 @@ export default class EncryptionService {
|
||||
// sjcl.random.addEntropy(hexSeed, 1024, 'shim.randomBytes');
|
||||
// }
|
||||
|
||||
async generateApiToken() {
|
||||
return await this.randomHexString(64);
|
||||
}
|
||||
|
||||
async randomHexString(byteCount: number) {
|
||||
const bytes: any[] = await shim.randomBytes(byteCount);
|
||||
return bytes
|
||||
|
Reference in New Issue
Block a user