Files
fredy/lib/services/security/hash.js
2025-12-11 10:40:55 +01:00

8 lines
248 B
JavaScript

/*
* Copyright (c) 2025 by Christian Kellner.
* Licensed under Apache-2.0 with Commons Clause and Attribution/Naming Clause
*/
import crypto from 'crypto';
export const hash = (x) => crypto.createHash('sha256').update(x, 'utf8').digest('hex');