Package org.symbol.sdk.nem
Class SharedKey
java.lang.Object
org.symbol.sdk.nem.SharedKey
- SharedKey
NEM shared-key derivation entry point. Uses HKDF-SHA-256 with the
"nem-nis1"info tag and the NEM (Keccak-512) hash mode; private key bytes are reversed before being passed to the derivation.
-
Method Summary
Modifier and TypeMethodDescriptionstatic CryptoTypes.SharedKey256deriveSharedKey(KeyPair keyPair, CryptoTypes.PublicKey otherPublicKey) Derives a shared key from a key pair and the other party's public key.static CryptoTypes.SharedKey256deriveSharedKeyDeprecated(KeyPair keyPair, CryptoTypes.PublicKey otherPublicKey, byte[] salt) Derives a shared key using the legacy NEM scheme; provided only for compatibility with messages encrypted by original NEM wallets — new code should usederiveSharedKey(KeyPair, CryptoTypes.PublicKey).
-
Method Details