mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-11-01 07:51:15 +00:00
refactor(noise/protocol): align DHStateHybrid with non-null DHState
- Match the tightened `copyFrom` signature on DHState by making the primary `other` parameter non-null while keeping `remote` nullable (a missing peer is meaningful for hybrid algorithms). - Note the inheritance relationship between the single- and two-arg copyFrom overloads. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
c04027774f
commit
2655aa7636
@ -37,6 +37,9 @@ interface DHStateHybrid : DHState {
|
||||
*/
|
||||
fun generateKeyPair(remote: DHState?)
|
||||
|
||||
// Note: copyFrom(other) is inherited from DHState; the two-arg overload
|
||||
// below adds the remote-peer parameter required by hybrid algorithms.
|
||||
|
||||
/**
|
||||
* Copies the key values from another DH object of the same type.
|
||||
*
|
||||
@ -46,7 +49,7 @@ interface DHStateHybrid : DHState {
|
||||
* @throws IllegalStateException The other or remote DH object does not have
|
||||
* the same type as this object.
|
||||
*/
|
||||
fun copyFrom(other: DHState?, remote: DHState?)
|
||||
fun copyFrom(other: DHState, remote: DHState?)
|
||||
|
||||
/**
|
||||
* Specifies the local peer object prior to setting a public key
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user