crypto: rename sha256 func to generateHmac

it has always been actually hmac
This commit is contained in:
wukko
2024-03-05 20:55:17 +06:00
parent 9211b39588
commit 6ed03b0035
3 changed files with 7 additions and 7 deletions

View File

@@ -3,7 +3,7 @@ import { createHmac, createCipheriv, createDecipheriv, scryptSync } from "crypto
const algorithm = "aes256"
const keyLength = 32;
export function sha256(str, salt) {
export function generateHmac(str, salt) {
return createHmac("sha256", salt).update(str).digest("base64");
}