Package org.jastacry.layer
Class AesEcbLayer
- java.lang.Object
-
- org.jastacry.layer.AbstractBasicLayer
-
- org.jastacry.layer.AbstractCipherLayer
-
- org.jastacry.layer.AesEcbLayer
-
- All Implemented Interfaces:
java.lang.Runnable,Layer
public class AesEcbLayer extends AbstractCipherLayer
AES Layer class.SPDX-License-Identifier: MIT
- Author:
- Kai Kretschmann
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringLAYERNAMEstatic 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 AesEcbLayer()Constructor of AesLayer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object o)Override equals method from object class.protected java.lang.StringgetMyAlg()Abstract base method for getting algorithm name back.protected intgetMyCount()Abstract base method for getting a counter back.protected intgetMyIvLen()Abstract base method for getting IV length back.protected java.lang.StringgetMyKeyAlg()Abstract base method for getting key algorithm name back.protected intgetMyKeysize()Abstract base method for getting key size back.protected intgetMySaltLen()Abstract base method for getting salt len back.inthashCode()Override equals method from object class.voidinit(java.lang.String data)init function.protected voidsetupPbe()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 JastacryExceptionGenerate Keys from plain password.- Specified by:
setupPbein 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:AbstractCipherLayerAbstract base method for getting algorithm name back.- Specified by:
getMyAlgin classAbstractCipherLayer- Returns:
- String
-
getMyKeyAlg
protected final java.lang.String getMyKeyAlg()
Description copied from class:AbstractCipherLayerAbstract base method for getting key algorithm name back.- Specified by:
getMyKeyAlgin classAbstractCipherLayer- Returns:
- String
-
getMySaltLen
protected int getMySaltLen()
Description copied from class:AbstractCipherLayerAbstract base method for getting salt len back.- Specified by:
getMySaltLenin classAbstractCipherLayer- Returns:
- int length
-
getMyIvLen
protected int getMyIvLen()
Description copied from class:AbstractCipherLayerAbstract base method for getting IV length back.- Specified by:
getMyIvLenin classAbstractCipherLayer- Returns:
- int length
-
getMyCount
protected int getMyCount()
Description copied from class:AbstractCipherLayerAbstract base method for getting a counter back.- Specified by:
getMyCountin classAbstractCipherLayer- Returns:
- int
-
getMyKeysize
protected int getMyKeysize()
Description copied from class:AbstractCipherLayerAbstract base method for getting key size back.- Specified by:
getMyKeysizein classAbstractCipherLayer- Returns:
- int length
-
equals
public boolean equals(java.lang.Object o)
Override equals method from object class.- Overrides:
equalsin classjava.lang.Object- Parameters:
o- object to compare with- Returns:
- true or false
-
hashCode
public int hashCode()
Override equals method from object class.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hash of properties
-
-