Files
plainleaf/client/space_lua/stdlib/crypto.ts
T
2025-11-07 10:49:13 +01:00

11 lines
299 B
TypeScript

import { LuaBuiltinFunction, LuaTable } from "../runtime.ts";
import { hashSHA256 } from "../../../plug-api/lib/crypto.ts";
export const cryptoApi = new LuaTable({
sha256: new LuaBuiltinFunction(
(_sf, s: string | Uint8Array): Promise<string> => {
return hashSHA256(s);
},
),
});