Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface IDiffieHellmanKeyBuilder

interface IDiffieHellmanKeyBuilder
Extends IAsymmetricKeyBuilder

Methods

modulus()

IDiffieHellmanKeyBuilder* modulus(u8[] modulus)
Specify the Diffie-Hellman modulus as a big-endian byte array compatible with OpenSSL’s BN_bin2bn.

Parameters

modulus
u8[] — Required The modulus as a byte array.

Returns

IDiffieHellmanKeyBuilder* The Diffie-Hellman key builder.

generator()

IDiffieHellmanKeyBuilder* generator(u32 generator)
Specify the Diffie-Hellman base.

Parameters

generator
u32 — Required The base.

Returns

IDiffieHellmanKeyBuilder* The Diffie-Hellman key builder.

buildPublicFromBigInteger()

IPublicKey* buildPublicFromBigInteger(u8[] bytes)
Build a Diffie-Hellman public key from a byte array containing a two’s complement representation of the key in big-endian byte-order. This representation is fully compatible with the byte array representation of a Java BigInteger as described in the MSL documentation.

Parameters

bytes
u8[] — Required The byte array representing the key.

Returns

IPublicKey* The public key.
Last modified on October 29, 2026