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 AHashServicethat allows configuration of its strategy via JavaBeans-compatible setter methods.Hash A CryptographicHashrepresents a one-way conversion algorithm that transforms an input source to an underlying byte array.HashRequest AHashRequestis composed of data that will be used by aHashServiceto compute a hash (aka 'digest').HashService AHashServicehashes input sources utilizing a particular hashing strategy. -
Class Summary Class Description AbstractHash Deprecated. in Shiro 1.1 in favor of using the concreteSimpleHashimplementation directly.DefaultHashService Default implementation of theHashServiceinterface, 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 constructingHashRequestinstances.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 AHashimplementation that allows anyMessageDigestalgorithm name to be used.SimpleHashRequest Simple implementation ofHashRequestthat can be used when interacting with aHashService.