Uses of Interface
org.apache.shiro.util.ByteSource
-
Packages that use ByteSource 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 theCredentialsMatcher
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' package 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). -
-
Uses of ByteSource in org.apache.shiro.authc
Fields in org.apache.shiro.authc declared as ByteSource Modifier and Type Field Description protected ByteSource
SimpleAuthenticationInfo. credentialsSalt
Any salt used in hashing the credentials.Methods in org.apache.shiro.authc that return ByteSource Modifier and Type Method Description ByteSource
SaltedAuthenticationInfo. getCredentialsSalt()
Returns the salt used to salt the account's credentials ornull
if no salt was used.ByteSource
SimpleAccount. getCredentialsSalt()
Returns the salt used to hash this Account's credentials (eg for password hashing), ornull
if no salt was used or credentials were not hashed at all.ByteSource
SimpleAuthenticationInfo. getCredentialsSalt()
Returns the salt used to hash the credentials, ornull
if no salt was used or credentials were not hashed at all.Methods in org.apache.shiro.authc with parameters of type ByteSource Modifier and Type Method Description void
SimpleAccount. setCredentialsSalt(ByteSource salt)
Sets the salt to use to hash this Account's credentials (eg for password hashing), ornull
if no salt is used or credentials are not hashed at all.void
SimpleAuthenticationInfo. setCredentialsSalt(ByteSource salt)
Sets the salt used to hash the credentials, ornull
if no salt was used or credentials were not hashed at all.Constructors in org.apache.shiro.authc with parameters of type ByteSource Constructor 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. -
Uses of ByteSource in org.apache.shiro.authc.credential
Methods in org.apache.shiro.authc.credential that return ByteSource Modifier and Type Method Description protected ByteSource
DefaultPasswordService. createByteSource(Object o)
Methods in org.apache.shiro.authc.credential with parameters of type ByteSource Modifier and Type Method Description protected HashRequest
DefaultPasswordService. buildHashRequest(ByteSource plaintext, Hash saved)
protected HashRequest
DefaultPasswordService. createHashRequest(ByteSource plaintext)
-
Uses of ByteSource in org.apache.shiro.crypto
Methods in org.apache.shiro.crypto that return ByteSource Modifier and Type Method 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
RandomNumberGenerator. nextBytes(int numBytes)
Generates a byte array of the specified length filled with random data.ByteSource
SecureRandomNumberGenerator. nextBytes()
ByteSource
SecureRandomNumberGenerator. nextBytes(int numBytes)
-
Uses of ByteSource in org.apache.shiro.crypto.hash
Subinterfaces of ByteSource in org.apache.shiro.crypto.hash Modifier and Type Interface Description interface
Hash
A CryptographicHash
represents a one-way conversion algorithm that transforms an input source to an underlying byte array.Classes in org.apache.shiro.crypto.hash that implement ByteSource Modifier and Type Class Description class
AbstractHash
Deprecated.in Shiro 1.1 in favor of using the concreteSimpleHash
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
AHash
implementation that allows anyMessageDigest
algorithm name to be used.Methods in org.apache.shiro.crypto.hash that return ByteSource Modifier and Type Method 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 specifiedsalt
argument's bytes and returns them in the form of aByteSource
instance.protected ByteSource
SimpleHash. convertSourceToBytes(Object source)
Acquires the specifiedsource
argument's bytes and returns them in the form of aByteSource
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 ornull
if no public salt should be used.ByteSource
Hash. getSalt()
Returns a salt used to compute the hash ornull
if no salt was used.ByteSource
HashRequest. getSalt()
Returns a salt to be used by theHashService
during hash computation, ornull
if no salt is provided as part of the request.ByteSource
SimpleHash. getSalt()
ByteSource
SimpleHashRequest. getSalt()
ByteSource
HashRequest. getSource()
Returns the source data that will be hashed by aHashService
.ByteSource
SimpleHashRequest. getSource()
protected ByteSource
SimpleHash. toByteSource(Object o)
Converts a given object into aByteSource
instance.Methods in org.apache.shiro.crypto.hash with parameters of type ByteSource Modifier and Type Method 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 theHashService
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 aHashService
.Constructors in org.apache.shiro.crypto.hash with parameters of type ByteSource Constructor Description SimpleHashRequest(String algorithmName, ByteSource source, ByteSource salt, int iterations)
Creates a new SimpleHashRequest instance. -
Uses of ByteSource in org.apache.shiro.util
Classes in org.apache.shiro.util that implement ByteSource Modifier and Type Class Description class
SimpleByteSource
Very simpleByteSource
implementation that maintains an internalbyte[]
array and uses theHex
andBase64
codec classes to support thetoHex()
andtoBase64()
implementations.Methods in org.apache.shiro.util that return ByteSource Modifier and Type Method Description static ByteSource
ByteSource.Util. bytes(byte[] bytes)
Returns a newByteSource
instance representing the specified byte array.static ByteSource
ByteSource.Util. bytes(char[] chars)
Returns a newByteSource
instance representing the specified character array's bytes.static ByteSource
ByteSource.Util. bytes(File file)
Returns a newByteSource
instance representing the specified File's bytes.static ByteSource
ByteSource.Util. bytes(InputStream stream)
Returns a newByteSource
instance representing the specified InputStream's bytes.static ByteSource
ByteSource.Util. bytes(Object source)
Returns aByteSource
instance representing the specified byte source argument.static ByteSource
ByteSource.Util. bytes(String string)
Returns a newByteSource
instance representing the specified string's bytes.static ByteSource
ByteSource.Util. bytes(ByteSource source)
Returns a newByteSource
instance representing the specified ByteSource.Methods in org.apache.shiro.util with parameters of type ByteSource Modifier and Type Method Description static ByteSource
ByteSource.Util. bytes(ByteSource source)
Returns a newByteSource
instance representing the specified ByteSource.Constructors in org.apache.shiro.util with parameters of type ByteSource Constructor Description SimpleByteSource(ByteSource source)
Creates an instance using the sources bytes directly - it does not create a copy of the argument's byte array.
-