Skip to content
moxon home

Hash

The /hash endpoint converts a string into a hash, i.e. a string of characters that cannot be reversed into the original string.

posthttps://api.moxon.dev/v6/hash
Try itpost/v6/hash

Parameters

  • textstringrequired

    The string to hash (word, sentence, paragraph, etc.)

  • methodstringrequired

    The hashing method to use (see available methods below)

    • sha256
    • sha512
    • sha3-256
    • blake2b512
    • md5
    • +47 more
  • encoding"hex" | "base64"optional

    Default: hex.

    Output encoding: hex (default) or base64

Available Methods52

Click to expand all available hashing methods

  • Blake Methods:
    • blake2b512
    • blake2s256
  • SHA Methods:
    • sha1
    • sha224
    • sha256
    • sha384
    • sha512
    • sha512-224
    • sha512-256
    • sha3-224
    • sha3-256
    • sha3-384
    • sha3-512
  • MD5 Methods:
    • md5
    • md5-sha1
    • md5WithRSAEncryption

Code Examples

Response Fields

  • methodstring

    Hashing method used

  • hashstring

    Resulting hash string (hex or base64 encoded digest)

  • encodingstring

    Encoding of the digest: hex or base64

Error Handling

If parameters are missing or invalid, the API will return an error:

  • 400Please provide a text (?text={text})The text parameter is missing
  • 400Text is requiredThe text parameter is empty
  • 400Please provide a valid hash algorithm (&method={algorithm})The method parameter is missing or invalid
  • 400Unsupported method. Use one of: {methods}The method is not a supported hash algorithm
  • 400Encoding must be one of: hex, base64Invalid encoding value