public class SM2Codec extends DefaultAsymmetricCodec implements AsymmetricCodec, AsymmetricKeyCodec, SignatureCodec
| 构造器和说明 |
|---|
SM2Codec() |
SM2Codec(String alg,
String keyAlg,
String signAlg) |
SM2Codec(String alg,
String keyAlg,
String signAlg,
String provider) |
| 限定符和类型 | 方法和说明 |
|---|---|
byte[] |
decrypt(byte[] data,
PrivateKey privateKey) |
int |
defaultKeySize() |
byte[] |
encrypt(byte[] data,
PublicKey publicKey) |
AsymmetricKeyCodec |
keyCodec()
秘钥生成
|
static SM2Codec |
noAlgorithmParameterSpec() |
SignatureCodec |
signatureCodec()
秘钥签名
return this
|
static SM2Codec |
sm2p256v1() |
static SM2Codec |
wapip192v1() |
alg, keyAlg, provider, signAlgclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAlgorithmParameterSpec, getPKCS8FromPrivateKey, getPrivateKey, getPrivateKeyFromPKCS8, getPrivateKeyFromPKCS8, getPrivateKeyFromPKCS8, getPublicKey, getX509FromPublicKey, getX509PublicKey, keyPair, keyPairsign, verifyalg, keyAlg, provider, signAlgpublic static SM2Codec noAlgorithmParameterSpec()
public static SM2Codec wapip192v1()
public static SM2Codec sm2p256v1()
public byte[] encrypt(byte[] data,
PublicKey publicKey)
throws Exception
encrypt 在接口中 AsymmetricCodecExceptionpublic byte[] decrypt(byte[] data,
PrivateKey privateKey)
throws Exception
decrypt 在接口中 AsymmetricCodecExceptionpublic AsymmetricKeyCodec keyCodec()
AsymmetricCodeckeyCodec 在接口中 AsymmetricCodecpublic SignatureCodec signatureCodec()
AsymmetricCodecsignatureCodec 在接口中 AsymmetricCodecpublic int defaultKeySize()
defaultKeySize 在接口中 AsymmetricKeyCodecCopyright © 2023 Pivotal Software, Inc.. All rights reserved.