Skip to main content
Glama

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
NameRequiredDescriptionDefault
inputYesThe input string to hash

Implementation Reference

  • 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 }], }; }
  • 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"), },
  • 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 }], }; } );
  • 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(); }

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/1595901624/crypto-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server