Function digest

Generates a hex string digest from a given message.

  • Parameters

    • algorithm: "SHA-1" | "SHA-256" | "SHA-384" | "SHA-512"

      Hash function ("SHA-1", "SHA-256", "SHA-384", "SHA-512").

    • message: string

      Text input.

    Returns Promise<string>

    • Digest as a hex string.