sha224
Generate a SHA-224 hash for any input string to ensure data integrity and security. This tool processes the provided string and outputs a fixed-length cryptographic hash.
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)Handler function that executes the sha224 tool logic by calling the DigestUtil.sha224 helper and returning the hash as MCP text content.({ input }) => { const hash = DigestUtil.sha224(input); return { content: [{ type: "text", text: hash }], }; }
- src/service/digest.ts:149-151 (schema)Input schema for the sha224 tool using Zod to validate the input string.{ 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, including 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 helper method in DigestUtil class that computes the SHA-224 hash of the input string using CryptoJS.SHA224.* 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(); }