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 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(Key key)
int
engineGetOutputSize(int inputLen)
AlgorithmParameters
engineGetParameters()
void
engineInit(int opmode, Key key, AlgorithmParameters params, SecureRandom random)
void
engineInit(int opmode, Key key, SecureRandom random)
void
engineInit(int opmode, Key key, AlgorithmParameterSpec engineSpec, SecureRandom random)
void
engineSetMode(String mode)
void
engineSetPadding(String padding)
byte[]
engineUpdate(byte[] input, int inputOffset, int inputLen)
int
engineUpdate(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset)
-
Methods inherited from class javax.crypto.CipherSpi
engineDoFinal, engineUnwrap, engineUpdate, engineUpdateAAD, engineUpdateAAD, engineWrap
-
-
-
-
Constructor Detail
-
GMCipherSpi
public GMCipherSpi(SM2Engine engine)
-
-
Method Detail
-
engineGetBlockSize
public int engineGetBlockSize()
- Specified by:
engineGetBlockSize
in classCipherSpi
-
engineGetKeySize
public int engineGetKeySize(Key key)
- Overrides:
engineGetKeySize
in classCipherSpi
-
engineGetIV
public byte[] engineGetIV()
- Specified by:
engineGetIV
in classCipherSpi
-
engineGetParameters
public AlgorithmParameters engineGetParameters()
- Specified by:
engineGetParameters
in classCipherSpi
-
engineSetMode
public void engineSetMode(String mode) throws NoSuchAlgorithmException
- Specified by:
engineSetMode
in classCipherSpi
- Throws:
NoSuchAlgorithmException
-
engineGetOutputSize
public int engineGetOutputSize(int inputLen)
- Specified by:
engineGetOutputSize
in classCipherSpi
-
engineSetPadding
public void engineSetPadding(String padding) throws NoSuchPaddingException
- Specified by:
engineSetPadding
in classCipherSpi
- Throws:
NoSuchPaddingException
-
engineInit
public void engineInit(int opmode, Key key, AlgorithmParameters params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException
- Specified by:
engineInit
in classCipherSpi
- Throws:
InvalidKeyException
InvalidAlgorithmParameterException
-
engineInit
public void engineInit(int opmode, Key key, AlgorithmParameterSpec engineSpec, SecureRandom random) throws InvalidAlgorithmParameterException, InvalidKeyException
- Specified by:
engineInit
in classCipherSpi
- Throws:
InvalidAlgorithmParameterException
InvalidKeyException
-
engineInit
public void engineInit(int opmode, Key key, SecureRandom random) throws InvalidKeyException
- Specified by:
engineInit
in classCipherSpi
- Throws:
InvalidKeyException
-
engineUpdate
public byte[] engineUpdate(byte[] input, int inputOffset, int inputLen)
- Specified by:
engineUpdate
in classCipherSpi
-
engineUpdate
public int engineUpdate(byte[] input, int inputOffset, int inputLen, byte[] output, int outputOffset)
- Specified by:
engineUpdate
in classCipherSpi
-
engineDoFinal
public byte[] engineDoFinal(byte[] input, int inputOffset, int inputLen) throws IllegalBlockSizeException, BadPaddingException
- Specified by:
engineDoFinal
in classCipherSpi
- Throws:
IllegalBlockSizeException
BadPaddingException
-
engineDoFinal
public int engineDoFinal(byte[] input, int inputOffset, int inputLength, byte[] output, int outputOffset) throws ShortBufferException, IllegalBlockSizeException, BadPaddingException
- Specified by:
engineDoFinal
in classCipherSpi
- Throws:
ShortBufferException
IllegalBlockSizeException
BadPaddingException
-
-