api/crypto: use buffers for salt directly instead of hex strings

This commit is contained in:
jj
2024-10-31 22:42:46 +00:00
parent 93e6344fc7
commit 2d6d406f48
2 changed files with 3 additions and 3 deletions

View File

@@ -3,7 +3,7 @@ import { createHmac, createCipheriv, createDecipheriv, randomBytes } from "crypt
const algorithm = "aes256";
export function generateSalt() {
return randomBytes(64).toString('hex');
return randomBytes(64);
}
export function generateHmac(str, salt) {