A SHA-1 digest looks like an byte[20] of apparently random bytes, though they are completely repeatable. You need to armour it if you want to make it printable for transporting in an email, for example. The SHA-1 digests that you see in the manifest of a Sun-style digitally signed jar file are base64 encoded.
SHA-1 is a trap-door, one-way function. You can easily compute the SHA-1 digest of a document, but you can’t go backwards and compose a document with a given digest. SHA-1 is not an encryption method.
| Sizes of SHA Digests | |||
|---|---|---|---|
| Name | Bits | Bytes | Hex Digits |
| SHA-1 | 160 | 20 | 40 |
| SHA-256 | 256 | 32 | 64 |
| SHA-384 | 384 | 48 | 96 |
| SHA-512 | 512 | 64 | 128 |
|
|
You can get the freshest copy of this page from: | or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror) |
| http://mindprod.com/jgloss/sha1.html | J:\mindprod\jgloss\sha1.html | |
![]() | ||
| Canadian Mind Products | ||
| mindprod.com IP:[65.110.21.43] | ||
| view Blog | Your face IP:[38.107.179.211] | |
| Feedback | You are visitor number 50,947. | |