Package org.apache.shiro.crypto.hash
Cryptographic Hashing components that greatly simplify one-way data hashing in an application.
The
Hash
interface and its implementations are significantly
easier to understand and use compared to the JDK's MessageDigest
mechanism.-
Interface Summary Interface Description ConfigurableHashService AHashService
that allows configuration of its strategy via JavaBeans-compatible setter methods.Hash A CryptographicHash
represents a one-way conversion algorithm that transforms an input source to an underlying byte array.HashRequest AHashRequest
is composed of data that will be used by aHashService
to compute a hash (aka 'digest').HashService AHashService
hashes input sources utilizing a particular hashing strategy. -
Class Summary Class Description AbstractHash Deprecated. in Shiro 1.1 in favor of using the concreteSimpleHash
implementation directly.DefaultHashService Default implementation of theHashService
interface, supporting a customizable hash algorithm name, secure-random salt generation, multiple hash iterations and an optional internalprivateSalt
.HashRequest.Builder A Builder class representing the Builder design pattern for constructingHashRequest
instances.Md2Hash Generates an MD2 Hash (RFC 1319) from a given input source with an optional salt and hash iterations.Md5Hash Generates an MD5 Hash (RFC 1321) from a given input source with an optional salt and hash iterations.Sha1Hash Generates an SHA-1 Hash (Secure Hash Standard, NIST FIPS 180-1) from a given input source with an optional salt and hash iterations.Sha256Hash Generates an SHA-256 Hash from a given input source with an optional salt and hash iterations.Sha384Hash Generates an SHA-384 Hash from a given input source with an optional salt and hash iterations.Sha512Hash Generates an SHA-512 Hash from a given input source with an optional salt and hash iterations.SimpleHash AHash
implementation that allows anyMessageDigest
algorithm name to be used.SimpleHashRequest Simple implementation ofHashRequest
that can be used when interacting with aHashService
.