Package org.jastacry.layer
Class AesCbcLayer
- java.lang.Object
-
- org.jastacry.layer.AbstractBasicLayer
-
- org.jastacry.layer.AbstractCipherLayer
-
- org.jastacry.layer.AesCbcLayer
-
- All Implemented Interfaces:
java.lang.Runnable
,Layer
public class AesCbcLayer extends AbstractCipherLayer
AES Layer class.SPDX-License-Identifier: MIT
- Author:
- Kai Kretschmann
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
LAYERNAME
static name of the layer.-
Fields inherited from class org.jastacry.layer.AbstractCipherLayer
BITSPERBYTE, chPasswd, currentIvLen, currentKeysize, currentSaltLen, iterCount, ivBytes, keyFac, pbeKey, pbeKeySpec, pbeSecretKeySpec, salt, strAlg, strKeyAlg
-
Fields inherited from class org.jastacry.layer.AbstractBasicLayer
endController, inputStream, logger, outputStream
-
-
Constructor Summary
Constructors Constructor Description AesCbcLayer()
Constructor of AesLayer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Override equals method from object class.protected java.lang.String
getMyAlg()
Abstract base method for getting algorithm name back.protected int
getMyCount()
Abstract base method for getting a counter back.protected int
getMyIvLen()
Abstract base method for getting IV length back.protected java.lang.String
getMyKeyAlg()
Abstract base method for getting key algorithm name back.protected int
getMyKeysize()
Abstract base method for getting key size back.protected int
getMySaltLen()
Abstract base method for getting salt len back.int
hashCode()
Override equals method from object class.void
init(java.lang.String data)
init function.protected void
setupPbe()
Generate Keys from plain password.-
Methods inherited from class org.jastacry.layer.AbstractCipherLayer
decStream, encodeAndDecode, encStream, getIv, getSalt, init
-
Methods inherited from class org.jastacry.layer.AbstractBasicLayer
rangeCheck, run, setAction, setEndController, setInputStream, setOutputStream, setRealLayerName, toString
-
-
-
-
Field Detail
-
LAYERNAME
public static final java.lang.String LAYERNAME
static name of the layer.- See Also:
- Constant Field Values
-
-
Method Detail
-
setupPbe
protected final void setupPbe() throws JastacryException
Generate Keys from plain password.- Specified by:
setupPbe
in classAbstractCipherLayer
- Throws:
JastacryException
- on error
-
init
public final void init(java.lang.String data)
init function. Overrides base init but uses it for setting base values.- Parameters:
data
- to initialize the crypt value.
-
getMyAlg
protected final java.lang.String getMyAlg()
Description copied from class:AbstractCipherLayer
Abstract base method for getting algorithm name back.- Specified by:
getMyAlg
in classAbstractCipherLayer
- Returns:
- String
-
getMyKeyAlg
protected final java.lang.String getMyKeyAlg()
Description copied from class:AbstractCipherLayer
Abstract base method for getting key algorithm name back.- Specified by:
getMyKeyAlg
in classAbstractCipherLayer
- Returns:
- String
-
getMySaltLen
protected int getMySaltLen()
Description copied from class:AbstractCipherLayer
Abstract base method for getting salt len back.- Specified by:
getMySaltLen
in classAbstractCipherLayer
- Returns:
- int length
-
getMyIvLen
protected int getMyIvLen()
Description copied from class:AbstractCipherLayer
Abstract base method for getting IV length back.- Specified by:
getMyIvLen
in classAbstractCipherLayer
- Returns:
- int length
-
getMyCount
protected int getMyCount()
Description copied from class:AbstractCipherLayer
Abstract base method for getting a counter back.- Specified by:
getMyCount
in classAbstractCipherLayer
- Returns:
- int
-
getMyKeysize
protected int getMyKeysize()
Description copied from class:AbstractCipherLayer
Abstract base method for getting key size back.- Specified by:
getMyKeysize
in classAbstractCipherLayer
- Returns:
- int length
-
equals
public boolean equals(java.lang.Object o)
Override equals method from object class.- Overrides:
equals
in classjava.lang.Object
- Parameters:
o
- object to compare with- Returns:
- true or false
-
hashCode
public int hashCode()
Override equals method from object class.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hash of properties
-
-