public abstract class Cipher
extends java.lang.Object
implements tr.gov.tubitak.uekae.esya.api.common.crypto.BaseCipher
Constructor and Description |
---|
Cipher() |
Modifier and Type | Method and Description |
---|---|
abstract byte[] |
doFinal(byte[] aData) |
abstract int |
getBlockSize() |
abstract CipherAlg |
getCipherAlgorithm() |
java.lang.String |
getCipherAlgorithmStr() |
abstract void |
init(byte[] aKey,
AlgorithmParams aParams) |
abstract void |
init(java.security.Key aKey,
AlgorithmParams aParams) |
abstract boolean |
isEncryptor() |
abstract byte[] |
process(byte[] aData)
Process subsequent block of data
|
abstract void |
reset()
Reset underlying cipher for reuse
|
public abstract byte[] doFinal(byte[] aData) throws CryptoException
doFinal
in interface tr.gov.tubitak.uekae.esya.api.common.crypto.BaseCipher
CryptoException
public abstract void init(java.security.Key aKey, AlgorithmParams aParams) throws CryptoException
aKey
- that will be used for cipher processCryptoException
- if key is not suitablepublic abstract void init(byte[] aKey, AlgorithmParams aParams) throws CryptoException
aKey
- material that will be used for cipher process.CryptoException
- if key is not suitablepublic abstract void reset() throws CryptoException
CryptoException
- if init failspublic abstract byte[] process(byte[] aData) throws CryptoException
aData
- to be processed. If underlying cipher processes fixed amount on block than this data length must be
multiple of block size.CryptoException
- if anything goes wrongpublic abstract int getBlockSize()
public abstract boolean isEncryptor()
public abstract CipherAlg getCipherAlgorithm()
public java.lang.String getCipherAlgorithmStr()
getCipherAlgorithmStr
in interface tr.gov.tubitak.uekae.esya.api.common.crypto.BaseCipher
Copyright © 2025. All rights reserved.