Class GMCipherSpi
- java.lang.Object
-
- javax.crypto.CipherSpi
-
- org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpi
-
- Direct Known Subclasses:
GMCipherSpi.SM2
,GMCipherSpi.SM2withBlake2b
,GMCipherSpi.SM2withBlake2s
,GMCipherSpi.SM2withMD5
,GMCipherSpi.SM2withRMD
,GMCipherSpi.SM2withSha1
,GMCipherSpi.SM2withSha224
,GMCipherSpi.SM2withSha256
,GMCipherSpi.SM2withSha384
,GMCipherSpi.SM2withSha512
,GMCipherSpi.SM2withWhirlpool
public class GMCipherSpi extends javax.crypto.CipherSpi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
GMCipherSpi.ErasableOutputStream
static class
GMCipherSpi.SM2
Classes that inherit from usstatic 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
-
Constructor Summary
Constructors Constructor Description GMCipherSpi(SM2Engine engine)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
int
engineGetOutputSize(int inputLen)
java.security.AlgorithmParameters
engineGetParameters()
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
engineInit(int opmode, java.security.Key key, java.security.spec.AlgorithmParameterSpec engineSpec, 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)
-
-
-
Constructor Detail
-
GMCipherSpi
public GMCipherSpi(SM2Engine engine)
-
-
Method Detail
-
engineGetBlockSize
public int engineGetBlockSize()
- Specified by:
engineGetBlockSize
in classjavax.crypto.CipherSpi
-
engineGetKeySize
public int engineGetKeySize(java.security.Key key)
- Overrides:
engineGetKeySize
in classjavax.crypto.CipherSpi
-
engineGetIV
public byte[] engineGetIV()
- Specified by:
engineGetIV
in classjavax.crypto.CipherSpi
-
engineGetParameters
public java.security.AlgorithmParameters engineGetParameters()
- Specified by:
engineGetParameters
in classjavax.crypto.CipherSpi
-
engineSetMode
public void engineSetMode(java.lang.String mode) throws java.security.NoSuchAlgorithmException
- Specified by:
engineSetMode
in classjavax.crypto.CipherSpi
- Throws:
java.security.NoSuchAlgorithmException
-
engineGetOutputSize
public int engineGetOutputSize(int inputLen)
- Specified by:
engineGetOutputSize
in classjavax.crypto.CipherSpi
-
engineSetPadding
public void engineSetPadding(java.lang.String padding) throws javax.crypto.NoSuchPaddingException
- Specified by:
engineSetPadding
in classjavax.crypto.CipherSpi
- Throws:
javax.crypto.NoSuchPaddingException
-
engineInit
public void engineInit(int opmode, java.security.Key key, java.security.AlgorithmParameters params, java.security.SecureRandom random) throws java.security.InvalidKeyException, java.security.InvalidAlgorithmParameterException
- Specified by:
engineInit
in classjavax.crypto.CipherSpi
- Throws:
java.security.InvalidKeyException
java.security.InvalidAlgorithmParameterException
-
engineInit
public void engineInit(int opmode, java.security.Key key, java.security.spec.AlgorithmParameterSpec engineSpec, java.security.SecureRandom random) throws java.security.InvalidAlgorithmParameterException, java.security.InvalidKeyException
- Specified by:
engineInit
in classjavax.crypto.CipherSpi
- Throws:
java.security.InvalidAlgorithmParameterException
java.security.InvalidKeyException
-
engineInit
public void engineInit(int opmode, java.security.Key key, java.security.SecureRandom random) throws java.security.InvalidKeyException
- Specified by:
engineInit
in classjavax.crypto.CipherSpi
- Throws:
java.security.InvalidKeyException
-
engineUpdate
public byte[] engineUpdate(byte[] input, int inputOffset, int inputLen)
- Specified by:
engineUpdate
in classjavax.crypto.CipherSpi
-
engineUpdate
public int engineUpdate(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset)
- Specified by:
engineUpdate
in classjavax.crypto.CipherSpi
-
engineDoFinal
public byte[] engineDoFinal(byte[] input, int inputOffset, int inputLen) throws javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException
- Specified by:
engineDoFinal
in classjavax.crypto.CipherSpi
- Throws:
javax.crypto.IllegalBlockSizeException
javax.crypto.BadPaddingException
-
engineDoFinal
public int engineDoFinal(byte[] input, int inputOffset, int inputLength, byte[] output, int outputOffset) throws javax.crypto.ShortBufferException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException
- Specified by:
engineDoFinal
in classjavax.crypto.CipherSpi
- Throws:
javax.crypto.ShortBufferException
javax.crypto.IllegalBlockSizeException
javax.crypto.BadPaddingException
-
-