Package | Description |
---|---|
org.apache.shiro.authc |
Core interfaces and exceptions concerning Authentication (the act of logging-in).
|
org.apache.shiro.authc.credential |
Support for validating credentials (such as passwords or X509 certificates) during
authentication via the
CredentialsMatcher
interface and its supporting implementations. |
org.apache.shiro.crypto |
Cryptography Cipher and Hashing components that greatly simplify the JDK's cryptography concepts and
add additional convenient behavior.
|
org.apache.shiro.crypto.hash |
Cryptographic Hashing components that greatly simplify one-way data hashing in an application.
|
org.apache.shiro.util |
Your run-of-the-mill 'util' pacakge for components and logic widely used across the framework that can't
find their home into a proper OO hierarchy (or, most likely for things used across many hierarchies).
|
Modifier and Type | Field and Description |
---|---|
protected ByteSource |
SimpleAuthenticationInfo.credentialsSalt
Any salt used in hashing the credentials.
|
Modifier and Type | Method and Description |
---|---|
ByteSource |
SaltedAuthenticationInfo.getCredentialsSalt()
Returns the salt used to salt the account's credentials or
null if no salt was used. |
ByteSource |
SimpleAuthenticationInfo.getCredentialsSalt()
Returns the salt used to hash the credentials, or
null if no salt was used or credentials were not
hashed at all. |
ByteSource |
SimpleAccount.getCredentialsSalt()
Returns the salt used to hash this Account's credentials (eg for password hashing), or
null if no salt
was used or credentials were not hashed at all. |
Modifier and Type | Method and Description |
---|---|
void |
SimpleAuthenticationInfo.setCredentialsSalt(ByteSource salt)
Sets the salt used to hash the credentials, or
null if no salt was used or credentials were not
hashed at all. |
void |
SimpleAccount.setCredentialsSalt(ByteSource salt)
Sets the salt to use to hash this Account's credentials (eg for password hashing), or
null if no salt
is used or credentials are not hashed at all. |
Constructor and Description |
---|
SimpleAccount(Object principal,
Object hashedCredentials,
ByteSource credentialsSalt,
String realmName)
Constructs a SimpleAccount instance for the specified realm with the given principals, hashedCredentials and
credentials salt used when hashing the credentials.
|
SimpleAccount(PrincipalCollection principals,
Object hashedCredentials,
ByteSource credentialsSalt)
Constructs a SimpleAccount instance for the specified principals and credentials.
|
SimpleAuthenticationInfo(Object principal,
Object hashedCredentials,
ByteSource credentialsSalt,
String realmName)
Constructor that takes in a single 'primary' principal of the account, its corresponding hashed credentials,
the salt used to hash the credentials, and the name of the realm to associate with the principals.
|
SimpleAuthenticationInfo(PrincipalCollection principals,
Object hashedCredentials,
ByteSource credentialsSalt)
Constructor that takes in an account's identifying principal(s), hashed credentials used to verify the
principals, and the salt used when hashing the credentials.
|
Modifier and Type | Method and Description |
---|---|
protected ByteSource |
DefaultPasswordService.createByteSource(Object o) |
Modifier and Type | Method and Description |
---|---|
protected HashRequest |
DefaultPasswordService.buildHashRequest(ByteSource plaintext,
Hash saved) |
protected HashRequest |
DefaultPasswordService.createHashRequest(ByteSource plaintext) |
Modifier and Type | Method and Description |
---|---|
ByteSource |
CipherService.decrypt(byte[] encrypted,
byte[] decryptionKey)
Decrypts encrypted data via the specified cipher key and returns the original (pre-encrypted) data.
|
ByteSource |
JcaCipherService.decrypt(byte[] ciphertext,
byte[] key) |
ByteSource |
CipherService.encrypt(byte[] raw,
byte[] encryptionKey)
Encrypts data via the specified cipher key.
|
ByteSource |
JcaCipherService.encrypt(byte[] plaintext,
byte[] key) |
ByteSource |
RandomNumberGenerator.nextBytes()
Generates a byte array of fixed length filled with random data, often useful for generating salts,
initialization vectors or other seed data.
|
ByteSource |
SecureRandomNumberGenerator.nextBytes() |
ByteSource |
RandomNumberGenerator.nextBytes(int numBytes)
Generates a byte array of the specified length filled with random data.
|
ByteSource |
SecureRandomNumberGenerator.nextBytes(int numBytes) |
Modifier and Type | Interface and Description |
---|---|
interface |
Hash
A Cryptographic
Hash represents a one-way conversion algorithm that transforms an input source to an
underlying byte array. |
Modifier and Type | Class and Description |
---|---|
class |
AbstractHash
Deprecated.
in Shiro 1.1 in favor of using the concrete
SimpleHash implementation directly. |
class |
Md2Hash
Generates an MD2 Hash (RFC 1319) from a given input source with an optional salt and
hash iterations.
|
class |
Md5Hash
Generates an MD5 Hash (RFC 1321) from a given input source with an optional salt and
hash iterations.
|
class |
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.
|
class |
Sha256Hash
Generates an SHA-256 Hash from a given input source with an optional salt and hash iterations.
|
class |
Sha384Hash
Generates an SHA-384 Hash from a given input source with an optional salt and hash iterations.
|
class |
Sha512Hash
Generates an SHA-512 Hash from a given input source with an optional salt and hash iterations.
|
class |
SimpleHash
A
Hash implementation that allows any MessageDigest algorithm name to
be used. |
Modifier and Type | Method and Description |
---|---|
protected ByteSource |
DefaultHashService.combine(ByteSource privateSalt,
ByteSource publicSalt)
Combines the specified 'private' salt bytes with the specified additional extra bytes to use as the
total salt during hash computation.
|
protected ByteSource |
SimpleHash.convertSaltToBytes(Object salt)
Acquires the specified
salt argument's bytes and returns them in the form of a ByteSource instance. |
protected ByteSource |
SimpleHash.convertSourceToBytes(Object source)
Acquires the specified
source argument's bytes and returns them in the form of a ByteSource instance. |
ByteSource |
DefaultHashService.getPrivateSalt() |
protected ByteSource |
DefaultHashService.getPublicSalt(HashRequest request)
Returns the public salt that should be used to compute a hash based on the specified request or
null if no public salt should be used. |
ByteSource |
SimpleHashRequest.getSalt() |
ByteSource |
HashRequest.getSalt()
Returns a salt to be used by the
HashService during hash computation, or null if no salt is
provided as part of the request. |
ByteSource |
SimpleHash.getSalt() |
ByteSource |
Hash.getSalt()
Returns a salt used to compute the hash or
null if no salt was used. |
ByteSource |
SimpleHashRequest.getSource() |
ByteSource |
HashRequest.getSource()
Returns the source data that will be hashed by a
HashService . |
protected ByteSource |
SimpleHash.toByteSource(Object o)
Converts a given object into a
ByteSource instance. |
Modifier and Type | Method and Description |
---|---|
protected ByteSource |
DefaultHashService.combine(ByteSource privateSalt,
ByteSource publicSalt)
Combines the specified 'private' salt bytes with the specified additional extra bytes to use as the
total salt during hash computation.
|
void |
ConfigurableHashService.setPrivateSalt(ByteSource privateSalt)
Sets the 'private' (internal) salt to be paired with a 'public' (random or supplied) salt during hash computation.
|
void |
DefaultHashService.setPrivateSalt(ByteSource privateSalt) |
HashRequest.Builder |
HashRequest.Builder.setSalt(ByteSource salt)
Sets a salt to be used by the
HashService during hash computation. |
void |
SimpleHash.setSalt(ByteSource salt)
Sets the salt used to previously compute AN ALREADY GENERATED HASH.
|
HashRequest.Builder |
HashRequest.Builder.setSource(ByteSource source)
Sets the source data that will be hashed by a
HashService . |
Constructor and Description |
---|
SimpleHashRequest(String algorithmName,
ByteSource source,
ByteSource salt,
int iterations)
Creates a new SimpleHashRequest instance.
|
Modifier and Type | Class and Description |
---|---|
class |
SimpleByteSource
Very simple
ByteSource implementation that maintains an internal byte[] array and uses the
Hex and Base64 codec classes to support the
toHex() and toBase64() implementations. |
Modifier and Type | Method and Description |
---|---|
static ByteSource |
ByteSource.Util.bytes(byte[] bytes)
Returns a new
ByteSource instance representing the specified byte array. |
static ByteSource |
ByteSource.Util.bytes(ByteSource source)
Returns a new
ByteSource instance representing the specified ByteSource. |
static ByteSource |
ByteSource.Util.bytes(char[] chars)
Returns a new
ByteSource instance representing the specified character array's bytes. |
static ByteSource |
ByteSource.Util.bytes(File file)
Returns a new
ByteSource instance representing the specified File's bytes. |
static ByteSource |
ByteSource.Util.bytes(InputStream stream)
Returns a new
ByteSource instance representing the specified InputStream's bytes. |
static ByteSource |
ByteSource.Util.bytes(Object source)
Returns a
ByteSource instance representing the specified byte source argument. |
static ByteSource |
ByteSource.Util.bytes(String string)
Returns a new
ByteSource instance representing the specified string's bytes. |
Modifier and Type | Method and Description |
---|---|
static ByteSource |
ByteSource.Util.bytes(ByteSource source)
Returns a new
ByteSource instance representing the specified ByteSource. |
Constructor and Description |
---|
SimpleByteSource(ByteSource source)
Creates an instance using the sources bytes directly - it does not create a copy of the
argument's byte array.
|
Copyright © 2004–2016 The Apache Software Foundation. All rights reserved.