public class SM2Client extends AbstractLoggingBean implements KeyExchange
| Modifier and Type | Field and Description |
|---|---|
protected byte |
expected |
protected byte[] |
h |
protected Digest |
hash |
protected byte[] |
i_c |
protected byte[] |
i_s |
protected byte[] |
k |
protected byte[] |
randomc |
protected byte[] |
v_c |
protected byte[] |
v_s |
logGROUP_KEX_OPCODES_MAP, SIMPLE_KEX_OPCODES_MAPBY_NAME_COMPARATOR, NAME_EXTRACTOR| Modifier and Type | Method and Description |
|---|---|
byte[] |
getH()
Retrieves the computed
h parameter |
Digest |
getHash()
The message digest used by this key exchange algorithm.
|
byte[] |
getK()
Retrieves the computed k parameter
|
String |
getName() |
Session |
getSession() |
void |
init(byte[] v_s,
byte[] v_c,
byte[] i_s,
byte[] i_c)
Initialize the key exchange algorithm.
|
boolean |
next(int cmd,
Buffer buffer)
Process the next packet
|
void |
setSession(Session session) |
debug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetGroupKexOpcodeName, getSimpleKexOpcodeName, isValidDHValuefindByName, findFirstMatchByName, getNameList, getNames, ofName, removeByName, safeCompareByNamegetSessionContextprotected byte[] v_s
protected byte[] v_c
protected byte[] i_s
protected byte[] i_c
protected Digest hash
protected byte[] k
protected byte[] h
protected byte expected
protected byte[] randomc
public SM2Client()
public SM2Client(Session session)
public void setSession(Session session)
public void init(byte[] v_s,
byte[] v_c,
byte[] i_s,
byte[] i_c)
throws Exception
KeyExchangeinit in interface KeyExchangev_s - the server identification stringv_c - the client identification stringi_s - the server key initialization packeti_c - the client key initialization packetException - if an error occurspublic boolean next(int cmd,
Buffer buffer)
throws Exception
KeyExchangenext in interface KeyExchangecmd - the commandbuffer - the packet contents positioned after the commandException - if an error occurspublic Session getSession()
getSession in interface SessionHolder<Session>public Digest getHash()
KeyExchangegetHash in interface KeyExchangepublic byte[] getH()
KeyExchangeh parametergetH in interface KeyExchangeh parameterpublic byte[] getK()
KeyExchangegetK in interface KeyExchangek parameterpublic String getName()
getName in interface NamedResourceCopyright © 2008–2025 The Apache Software Foundation. All rights reserved.