sha512
Generate SHA-512 hash values from input strings to ensure data integrity and security. Use this tool for cryptographic hashing to securely process and verify text data.
Instructions
Calculate SHA-512 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:137-142 (handler)Handler function for the sha512 MCP tool. Takes input string, calls DigestUtil.sha512 helper, and returns the hash as text content.({ input }) => { const hash = DigestUtil.sha512(input); return { content: [{ type: "text", text: hash }], }; }
- src/service/digest.ts:134-136 (schema)Input schema for the sha512 tool using Zod: a string described as 'The input string to hash'.{ input: z.string().describe("The input string to hash"), },
- src/service/digest.ts:131-143 (registration)Registration of the sha512 tool using server.tool within the registerDigestTool function.server.tool( "sha512", "Calculate SHA-512 hash of a string", { input: z.string().describe("The input string to hash"), }, ({ input }) => { const hash = DigestUtil.sha512(input); return { content: [{ type: "text", text: hash }], }; } );
- src/service/digest.ts:51-54 (helper)DigestUtil.sha512 static method: computes SHA-512 hash using CryptoJS and returns hex string.static sha512(input: string): string { const hash = CryptoJS.SHA512(input); return hash.toString(); }