Skip to content

SHA-384 hash generator

Free, no sign-up Runs in your browser

Type or paste text and get its SHA-384 hash as 96 hex characters and as Base64, the form Subresource Integrity uses. Computed in your browser; nothing is sent.

Hashed in your browser as UTF-8, exactly as typed: a trailing space or line break changes the hash.

SHA-384 (hex)
The result appears here.
SHA-384 (Base64)
The result appears here.

Everything you type here stays in your browser. Nothing is sent to HardenKit or to anyone else.

How to use the SHA-384 hash generator

  1. Type or paste the text. It is hashed as UTF-8, exactly as entered.
  2. Read the hash as 96 hex characters, or as Base64.
  3. Copy the form you need with the button above it.

About this tool

SHA-384 is SHA-512 with different starting values and the output cut to 384 bits, written as 96 hex characters. It belongs to the SHA-2 family in FIPS 180-4 and has the same speed as SHA-512. It exists to pair with 192-bit security levels: it is the hash used with the P-384 curve in ECDSA, in the TLS cipher suites that end in SHA384, and in the US government’s CNSA suite.

On the web you meet it most in Subresource Integrity. The integrity attribute on a script or stylesheet tag holds a hash of the file, and sha384 with the hash in Base64 is the form most CDNs hand out. The Base64 output of this tool is that same encoding, though for SRI you hash the file’s bytes, not typed text.

Because the truncation hides part of the internal state, SHA-384 is not open to the length-extension attack that affects SHA-256 and SHA-512: knowing a hash does not let anyone extend the message. That is a useful property, but the right tool for authenticating a message with a key is still HMAC. As with every fast hash, do not use it to store passwords.

Sources

Questions

What is SHA-384 used for?

Mainly where a 192-bit security level is specified: ECDSA with the P-384 curve (ES384 in JWTs), TLS cipher suites such as TLS_AES_256_GCM_SHA384, and government profiles. It is also the usual choice for Subresource Integrity hashes.

Is SHA-384 better than SHA-256?

It offers a higher collision-resistance level, 192 bits against 128, and resists length extension. Both are secure against every known attack. SHA-256 is more widely supported and gives shorter values, so choose SHA-384 when a standard or a peer asks for it.

How do I get a sha384 hash for Subresource Integrity?

Hash the exact bytes of the file, encode the 48 bytes as Base64 and write integrity="sha384-" followed by that value. With OpenSSL: openssl dgst -sha384 -binary file.js | openssl base64 -A. For a file, use a tool that reads the file, since pasting text can change line endings.

How long is a SHA-384 hash?

It is 384 bits, which is 48 bytes: 96 characters in hex and 64 in Base64. No padding characters are needed in Base64 because 48 is a multiple of three.

Related tools