public class SM2Cipher
extends org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpi
org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpi.ErasableOutputStream, org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpi.SM2, org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpi.SM2withBlake2b, org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpi.SM2withBlake2s, org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpi.SM2withMD5, org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpi.SM2withRMD, org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpi.SM2withSha1, org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpi.SM2withSha224, org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpi.SM2withSha256, org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpi.SM2withSha384, org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpi.SM2withSha512, org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpi.SM2withWhirlpool| Constructor and Description |
|---|
SM2Cipher() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
engineDoFinal(byte[] in,
int inOfs,
int inLen) |
int |
engineDoFinal(byte[] in,
int inOfs,
int inLen,
byte[] out,
int outOfs) |
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.spec.AlgorithmParameterSpec params,
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 paddingName) |
java.security.Key |
engineUnwrap(byte[] wrappedKey,
java.lang.String algorithm,
int type) |
byte[] |
engineUpdate(byte[] in,
int inOfs,
int inLen) |
int |
engineUpdate(byte[] in,
int inOfs,
int inLen,
byte[] out,
int outOfs) |
byte[] |
engineWrap(java.security.Key key) |
public void engineSetMode(java.lang.String mode)
throws java.security.NoSuchAlgorithmException
engineSetMode in class org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpijava.security.NoSuchAlgorithmExceptionpublic void engineSetPadding(java.lang.String paddingName)
throws javax.crypto.NoSuchPaddingException
engineSetPadding in class org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpijavax.crypto.NoSuchPaddingExceptionpublic void engineInit(int opmode,
java.security.Key key,
java.security.SecureRandom random)
throws java.security.InvalidKeyException
engineInit in class org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpijava.security.InvalidKeyExceptionpublic void engineInit(int opmode,
java.security.Key key,
java.security.spec.AlgorithmParameterSpec params,
java.security.SecureRandom random)
throws java.security.InvalidKeyException,
java.security.InvalidAlgorithmParameterException
engineInit in class org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpijava.security.InvalidKeyExceptionjava.security.InvalidAlgorithmParameterExceptionpublic 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 org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpijava.security.InvalidKeyExceptionjava.security.InvalidAlgorithmParameterExceptionpublic byte[] engineUpdate(byte[] in,
int inOfs,
int inLen)
engineUpdate in class org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpipublic int engineUpdate(byte[] in,
int inOfs,
int inLen,
byte[] out,
int outOfs)
engineUpdate in class org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpipublic byte[] engineDoFinal(byte[] in,
int inOfs,
int inLen)
throws javax.crypto.IllegalBlockSizeException,
javax.crypto.BadPaddingException
engineDoFinal in class org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpijavax.crypto.IllegalBlockSizeExceptionjavax.crypto.BadPaddingExceptionpublic int engineDoFinal(byte[] in,
int inOfs,
int inLen,
byte[] out,
int outOfs)
throws javax.crypto.ShortBufferException,
javax.crypto.IllegalBlockSizeException,
javax.crypto.BadPaddingException
engineDoFinal in class org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpijavax.crypto.ShortBufferExceptionjavax.crypto.IllegalBlockSizeExceptionjavax.crypto.BadPaddingExceptionpublic byte[] engineWrap(java.security.Key key)
throws java.security.InvalidKeyException,
javax.crypto.IllegalBlockSizeException
engineWrap in class javax.crypto.CipherSpijava.security.InvalidKeyExceptionjavax.crypto.IllegalBlockSizeExceptionpublic java.security.Key engineUnwrap(byte[] wrappedKey,
java.lang.String algorithm,
int type)
throws java.security.InvalidKeyException,
java.security.NoSuchAlgorithmException
engineUnwrap in class javax.crypto.CipherSpijava.security.InvalidKeyExceptionjava.security.NoSuchAlgorithmExceptionpublic java.security.AlgorithmParameters engineGetParameters()
engineGetParameters in class org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpipublic byte[] engineGetIV()
engineGetIV in class org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpipublic int engineGetBlockSize()
engineGetBlockSize in class org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpipublic int engineGetOutputSize(int inputLen)
engineGetOutputSize in class org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpipublic int engineGetKeySize(java.security.Key key)
engineGetKeySize in class org.bouncycastle.jcajce.provider.asymmetric.ec.GMCipherSpi