MCPcopy Create free account
hub / github.com/hydro-dev/Hydro / encrypt

Function encrypt

framework/utils/lib/utils.ts:39–39  ·  view source on GitHub ↗
(algorithm, content)

Source from the content-addressed store, hash-verified

37export const Logger = createLogger as any as Logger;
38
39const encrypt = (algorithm, content) => crypto.createHash(algorithm).update(content).digest('hex');
40export const sha1 = (content: string) => encrypt('sha1', content);
41export const sha256 = (content: string) => encrypt('sha256', content);
42export const md5 = (content: string) => encrypt('md5', content);

Callers 3

sha1Function · 0.85
sha256Function · 0.85
md5Function · 0.85

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected