sha384
Generate SHA-384 hash for any input string to ensure cryptographic integrity using the Crypto_MCP server.
Instructions
Calculate SHA-384 hash of a string
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | The input string to hash |
Implementation Reference
- src/service/digest.ts:122-127 (handler)The handler function for the sha384 MCP tool, which calls DigestUtil.sha384 on the input and returns the hash as text content.({ input }) => { const hash = DigestUtil.sha384(input); return { content: [{ type: "text", text: hash }], }; }
- src/service/digest.ts:119-121 (schema)Zod input schema for the sha384 tool, defining a single string parameter.{ input: z.string().describe("The input string to hash"), },
- src/service/digest.ts:116-128 (registration)MCP server registration of the sha384 tool, including name, description, schema, and handler.server.tool( "sha384", "Calculate SHA-384 hash of a string", { input: z.string().describe("The input string to hash"), }, ({ input }) => { const hash = DigestUtil.sha384(input); return { content: [{ type: "text", text: hash }], }; } );
- src/service/digest.ts:41-44 (helper)DigestUtil static method implementing SHA-384 hashing using CryptoJS library.static sha384(input: string): string { const hash = CryptoJS.SHA384(input); return hash.toString(); }