sha384
Calculate SHA-384 cryptographic hash for data integrity verification and security applications within the Crypto_MCP server environment.
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)Handler function for the sha384 MCP tool. It invokes DigestUtil.sha384 on the input string and formats the result as MCP text content.({ input }) => { const hash = DigestUtil.sha384(input); return { content: [{ type: "text", text: hash }], }; }
- src/service/digest.ts:119-121 (schema)Input schema definition for the sha384 tool using Zod, specifying a string parameter.{ input: z.string().describe("The input string to hash"), },
- src/service/digest.ts:116-128 (registration)Registration of the sha384 tool via server.tool call within registerDigestTool function.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)Core implementation of SHA-384 hashing in DigestUtil class using CryptoJS library.static sha384(input: string): string { const hash = CryptoJS.SHA384(input); return hash.toString(); }
- src/index.ts:16-16 (registration)Top-level registration call that invokes registerDigestTool on the main McpServer instance, thereby registering the sha384 tool.registerDigestTool(server);