mirror of
https://github.com/Nezumi-2711/next-gdrive-index.git
synced 2026-09-23 04:10:03 +00:00
Start migration, and re-organizing files.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import crypto from "crypto";
|
||||
|
||||
function generateRandomEncryptionKey(): Promise<string> {
|
||||
return new Promise((resolve, reject) => {
|
||||
crypto.randomBytes(32, (err, buffer) => {
|
||||
if (err) {
|
||||
reject(err);
|
||||
}
|
||||
resolve(buffer.toString("hex"));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export default generateRandomEncryptionKey;
|
||||
Reference in New Issue
Block a user