public class GMCipherSpi extends BaseCipherSpi
| Modifier and Type | Class and Description |
|---|---|
protected static class |
GMCipherSpi.ErasableOutputStream
A ByteArrayOutputStream whose contents can be zeroed: reset() only rewinds the count and
leaves what was written in the backing array, and a growth, left to ByteArrayOutputStream,
drops the array it replaces as it stands.
|
static class |
GMCipherSpi.SM2
Classes that inherit from us
|
static class |
GMCipherSpi.SM2withBlake2b |
static class |
GMCipherSpi.SM2withBlake2s |
static class |
GMCipherSpi.SM2withMD5 |
static class |
GMCipherSpi.SM2withRMD |
static class |
GMCipherSpi.SM2withSha1 |
static class |
GMCipherSpi.SM2withSha224 |
static class |
GMCipherSpi.SM2withSha256 |
static class |
GMCipherSpi.SM2withSha384 |
static class |
GMCipherSpi.SM2withSha512 |
static class |
GMCipherSpi.SM2withWhirlpool |
engineParams, wrapEngine| Constructor and Description |
|---|
GMCipherSpi(Digest digest) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
engineDoFinal(byte[] input,
int inputOffset,
int inputLen) |
int |
engineDoFinal(byte[] input,
int inputOffset,
int inputLength,
byte[] output,
int outputOffset) |
int |
engineGetBlockSize() |
byte[] |
engineGetIV() |
int |
engineGetKeySize(java.security.Key key)
The field size of the key's curve, for any EC key init accepts - not just a BC one - so the key
is converted the same way init converts it.
|
int |
engineGetOutputSize(int inputLen)
The size of the next doFinal's output, which takes the input update() has buffered as well as
inputLen more.
|
java.security.AlgorithmParameters |
engineGetParameters() |
void |
engineInit(int opmode,
java.security.Key key,
java.security.spec.AlgorithmParameterSpec engineSpec,
java.security.SecureRandom random) |
void |
engineInit(int opmode,
java.security.Key key,
java.security.AlgorithmParameters params,
java.security.SecureRandom random) |
void |
engineInit(int opmode,
java.security.Key key,
java.security.SecureRandom random) |
void |
engineSetMode(java.lang.String mode) |
void |
engineSetPadding(java.lang.String padding) |
byte[] |
engineUpdate(byte[] input,
int inputOffset,
int inputLen) |
int |
engineUpdate(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset) |
createParametersInstance, engineUnwrap, engineWrappublic GMCipherSpi(Digest digest)
public int engineGetBlockSize()
engineGetBlockSize in class BaseCipherSpipublic int engineGetKeySize(java.security.Key key)
engineGetKeySize in class BaseCipherSpipublic byte[] engineGetIV()
engineGetIV in class BaseCipherSpipublic java.security.AlgorithmParameters engineGetParameters()
engineGetParameters in class BaseCipherSpipublic void engineSetMode(java.lang.String mode)
throws java.security.NoSuchAlgorithmException
engineSetMode in class BaseCipherSpijava.security.NoSuchAlgorithmExceptionpublic int engineGetOutputSize(int inputLen)
engineGetOutputSize in class BaseCipherSpipublic void engineSetPadding(java.lang.String padding)
throws javax.crypto.NoSuchPaddingException
engineSetPadding in class BaseCipherSpijavax.crypto.NoSuchPaddingExceptionpublic void engineInit(int opmode,
java.security.Key key,
java.security.AlgorithmParameters params,
java.security.SecureRandom random)
throws java.security.InvalidKeyException,
java.security.InvalidAlgorithmParameterException
engineInit in class javax.crypto.CipherSpijava.security.InvalidKeyExceptionjava.security.InvalidAlgorithmParameterExceptionpublic void engineInit(int opmode,
java.security.Key key,
java.security.spec.AlgorithmParameterSpec engineSpec,
java.security.SecureRandom random)
throws java.security.InvalidAlgorithmParameterException,
java.security.InvalidKeyException
engineInit in class javax.crypto.CipherSpijava.security.InvalidAlgorithmParameterExceptionjava.security.InvalidKeyExceptionpublic void engineInit(int opmode,
java.security.Key key,
java.security.SecureRandom random)
throws java.security.InvalidKeyException
engineInit in class javax.crypto.CipherSpijava.security.InvalidKeyExceptionpublic byte[] engineUpdate(byte[] input,
int inputOffset,
int inputLen)
engineUpdate in class javax.crypto.CipherSpipublic int engineUpdate(byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset)
engineUpdate in class javax.crypto.CipherSpipublic byte[] engineDoFinal(byte[] input,
int inputOffset,
int inputLen)
throws javax.crypto.IllegalBlockSizeException,
javax.crypto.BadPaddingException
engineDoFinal in class javax.crypto.CipherSpijavax.crypto.IllegalBlockSizeExceptionjavax.crypto.BadPaddingExceptionpublic int engineDoFinal(byte[] input,
int inputOffset,
int inputLength,
byte[] output,
int outputOffset)
throws javax.crypto.ShortBufferException,
javax.crypto.IllegalBlockSizeException,
javax.crypto.BadPaddingException
engineDoFinal in class javax.crypto.CipherSpijavax.crypto.ShortBufferExceptionjavax.crypto.IllegalBlockSizeExceptionjavax.crypto.BadPaddingException