Skip to main content
Glama

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

Implementation Reference

  • 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 }],
      };
    }
  • Zod input schema defining a single string parameter for the string to hash.
    {
      input: z.string().describe("The input string to hash"),
    },
  • 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 }],
        };
      }
    );
  • 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();
    }

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