public class SM2KeyAgreement extends KeyAgreementSpi
| 限定符和类型 | 字段和说明 |
|---|---|
private byte[] |
localId |
private org.bouncycastle.jce.interfaces.ECPrivateKey |
localPrivateKey |
private org.bouncycastle.jce.interfaces.ECPublicKey |
localPublicKey |
private BigInteger |
localRandom |
private byte[] |
peerId |
private org.bouncycastle.jce.interfaces.ECPublicKey |
peerPublicKey |
private byte[] |
peerRBytes |
private int |
secretLen |
private boolean |
useClientMode |
| 构造器和说明 |
|---|
SM2KeyAgreement() |
| 限定符和类型 | 方法和说明 |
|---|---|
private SM2KeyExchangeParameterSpec |
checkParams(AlgorithmParameterSpec params) |
protected Key |
engineDoPhase(Key key,
boolean lastPhase) |
protected byte[] |
engineGenerateSecret() |
protected int |
engineGenerateSecret(byte[] sharedSecret,
int offset) |
protected SecretKey |
engineGenerateSecret(String algorithm) |
protected void |
engineInit(Key key,
AlgorithmParameterSpec params,
SecureRandom random) |
protected void |
engineInit(Key key,
SecureRandom random) |
private org.bouncycastle.jce.interfaces.ECPublicKey localPublicKey
private org.bouncycastle.jce.interfaces.ECPrivateKey localPrivateKey
private byte[] localId
private BigInteger localRandom
private org.bouncycastle.jce.interfaces.ECPublicKey peerPublicKey
private byte[] peerRBytes
private byte[] peerId
private int secretLen
private boolean useClientMode
protected void engineInit(Key key, SecureRandom random) throws InvalidKeyException
engineInit 在类中 KeyAgreementSpiInvalidKeyExceptionprotected void engineInit(Key key, AlgorithmParameterSpec params, SecureRandom random) throws InvalidKeyException, InvalidAlgorithmParameterException
private SM2KeyExchangeParameterSpec checkParams(AlgorithmParameterSpec params) throws InvalidAlgorithmParameterException
protected Key engineDoPhase(Key key, boolean lastPhase) throws InvalidKeyException, IllegalStateException
protected byte[] engineGenerateSecret()
throws IllegalStateException
engineGenerateSecret 在类中 KeyAgreementSpiIllegalStateExceptionprotected int engineGenerateSecret(byte[] sharedSecret,
int offset)
throws IllegalStateException,
ShortBufferException
protected SecretKey engineGenerateSecret(String algorithm) throws IllegalStateException, NoSuchAlgorithmException
Copyright © 2022. All rights reserved.