sha224
Calculate SHA-224 cryptographic hash values for data verification and integrity checking within the Crypto_MCP server's security toolkit.
Instructions
Calculate SHA-224 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:152-157 (handler)MCP tool handler that invokes DigestUtil.sha224 on the input and formats the result as MCP text content.({ input }) => { const hash = DigestUtil.sha224(input); return { content: [{ type: "text", text: hash }], }; }
- src/service/digest.ts:149-151 (schema)Zod input schema defining a single string parameter for the string to hash.{ input: z.string().describe("The input string to hash"), },
- src/service/digest.ts:146-158 (registration)Registration of the sha224 tool on the MCP server, specifying name, description, schema, and handler.server.tool( "sha224", "Calculate SHA-224 hash of a string", { input: z.string().describe("The input string to hash"), }, ({ input }) => { const hash = DigestUtil.sha224(input); return { content: [{ type: "text", text: hash }], }; } );
- src/service/digest.ts:57-64 (helper)Static utility method in DigestUtil class that computes the SHA-224 hash using CryptoJS.* Calculate SHA-224 hash of a string * @param input The input string to hash * @returns 56-character hexadecimal SHA-224 hash */ static sha224(input: string): string { const hash = CryptoJS.SHA224(input); return hash.toString(); }