Class BlockEncryptionAlgorithmImpl
- java.lang.Object
-
- se.swedenconnect.security.algorithms.impl.AbstractAlgorithm
-
- se.swedenconnect.security.algorithms.impl.AbstractJoseAlgorithm
-
- se.swedenconnect.security.algorithms.impl.AbstractKeyBasedAlgorithm
-
- se.swedenconnect.security.algorithms.impl.AbstractEncryptionAlgorithm
-
- se.swedenconnect.security.algorithms.impl.BlockEncryptionAlgorithmImpl
-
- All Implemented Interfaces:
Algorithm,BlockEncryptionAlgorithm,EncryptionAlgorithm,JoseAlgorithm,KeyBasedAlgorithm
public class BlockEncryptionAlgorithmImpl extends AbstractEncryptionAlgorithm implements BlockEncryptionAlgorithm
Implementation class forBlockEncryptionAlgorithm.- Author:
- Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBlockEncryptionAlgorithmImpl.BlockEncryptionAlgorithmBuilderBuilder forBlockEncryptionAlgorithmobjects.-
Nested classes/interfaces inherited from class se.swedenconnect.security.algorithms.impl.AbstractEncryptionAlgorithm
AbstractEncryptionAlgorithm.AbstractEncryptionAlgorithmBuilder<T extends AbstractEncryptionAlgorithm,B extends AbstractEncryptionAlgorithm.AbstractEncryptionAlgorithmBuilder<T,? extends AlgorithmBuilder<T>>>
-
Nested classes/interfaces inherited from class se.swedenconnect.security.algorithms.impl.AbstractKeyBasedAlgorithm
AbstractKeyBasedAlgorithm.AbstractKeyBasedAlgorithmBuilder<T extends AbstractKeyBasedAlgorithm,B extends AbstractKeyBasedAlgorithm.AbstractKeyBasedAlgorithmBuilder<T,? extends AlgorithmBuilder<T>>>
-
Nested classes/interfaces inherited from class se.swedenconnect.security.algorithms.impl.AbstractJoseAlgorithm
AbstractJoseAlgorithm.AbstractJoseAlgorithmBuilder<T extends AbstractJoseAlgorithm,B extends AbstractJoseAlgorithm.AbstractJoseAlgorithmBuilder<T,? extends AlgorithmBuilder<T>>>
-
Nested classes/interfaces inherited from class se.swedenconnect.security.algorithms.impl.AbstractAlgorithm
AbstractAlgorithm.AbstractAlgorithmBuilder<T extends AbstractAlgorithm,B extends AlgorithmBuilder<T>>
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBlockEncryptionAlgorithmImpl(String uri)Protected constructor used by builder.BlockEncryptionAlgorithmImpl(String uri, int order, String keyType, int keyLength, int ivLength, String jcaName, com.nimbusds.jose.Algorithm joseAlgorithm)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BlockEncryptionAlgorithmImpl.BlockEncryptionAlgorithmBuilderbuilder(String uri)Creates a builder.booleanequals(Object obj)intgetIvLength()Gets the number of bits for the initialization vector (IV).inthashCode()protected voidsetIvLength(int ivLength)Assigns the IV length.StringtoString()-
Methods inherited from class se.swedenconnect.security.algorithms.impl.AbstractEncryptionAlgorithm
getKeyLength, setKeyLength
-
Methods inherited from class se.swedenconnect.security.algorithms.impl.AbstractKeyBasedAlgorithm
getKeyType, setKeyType
-
Methods inherited from class se.swedenconnect.security.algorithms.impl.AbstractJoseAlgorithm
getJoseAlgorithm, setJoseAlgorithm
-
Methods inherited from class se.swedenconnect.security.algorithms.impl.AbstractAlgorithm
getJcaName, getOrder, getUri, isBlacklisted, setBlacklisted, setJcaName, setOrder
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface se.swedenconnect.security.algorithms.Algorithm
getJcaName, getOrder, getUri, isBlacklisted
-
Methods inherited from interface se.swedenconnect.security.algorithms.BlockEncryptionAlgorithm
getType
-
Methods inherited from interface se.swedenconnect.security.algorithms.EncryptionAlgorithm
getKeyLength
-
Methods inherited from interface se.swedenconnect.security.algorithms.JoseAlgorithm
getJoseAlgorithm
-
Methods inherited from interface se.swedenconnect.security.algorithms.KeyBasedAlgorithm
getKeyType
-
-
-
-
Constructor Detail
-
BlockEncryptionAlgorithmImpl
public BlockEncryptionAlgorithmImpl(String uri, int order, String keyType, int keyLength, int ivLength, String jcaName, com.nimbusds.jose.Algorithm joseAlgorithm)
Constructor.- Parameters:
uri- the algorithm URIorder- the ordering for the algorithmkeyType- the key typekeyLength- the key length in bitsivLength- IV length in bitsjcaName- the JCA namejoseAlgorithm- the JOSE algorithm (may be null)
-
BlockEncryptionAlgorithmImpl
protected BlockEncryptionAlgorithmImpl(String uri)
Protected constructor used by builder.- Parameters:
uri- the algorithm URI
-
-
Method Detail
-
builder
public static BlockEncryptionAlgorithmImpl.BlockEncryptionAlgorithmBuilder builder(String uri)
Creates a builder.- Parameters:
uri- the algorithm URI- Returns:
- the builder
-
getIvLength
public int getIvLength()
Gets the number of bits for the initialization vector (IV).- Specified by:
getIvLengthin interfaceBlockEncryptionAlgorithm- Returns:
- the IV length
-
setIvLength
protected void setIvLength(int ivLength)
Assigns the IV length.- Parameters:
ivLength- the IV length
-
hashCode
public int hashCode()
- Overrides:
hashCodein classAbstractEncryptionAlgorithm
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classAbstractEncryptionAlgorithm
-
toString
public String toString()
- Overrides:
toStringin classAbstractEncryptionAlgorithm
-
-