6 lines
141 B
JavaScript
6 lines
141 B
JavaScript
import { createHmac } from "crypto";
|
|
|
|
export function sha256(str, salt) {
|
|
return createHmac("sha256", salt).update(str).digest("hex");
|
|
}
|