PrivMX DOCS
API Reference/PrivMX Endpoint Java/Crypto

ExtKey

Class representing Extended keys and operations on it.

Static Methods

fromBase58

Decodes ExtKey from Base58 format.

Params

base58

String

the ExtKey in Base58

public static ExtKey fromBase58(
String base58
)

Returns

ExtKey · ExtKey object

fromSeed

Creates ExtKey from given seed.

Params

seed

byte[]

the seed used to generate Key

public static ExtKey fromSeed(
byte[] seed
)

Returns

ExtKey · ExtKey object

generateRandom

Generates a new ExtKey.

public static ExtKey generateRandom()

Returns

ExtKey · ExtKey object

Methods

close

public void close()

derive

Generates child ExtKey from a current ExtKey using BIP32.

Params

index

int

number from 0 to 2^31-1

public ExtKey derive(
int index
)

Returns

ExtKey · ExtKey object

deriveHardened

Generates hardened child ExtKey from a current ExtKey using BIP32.

Params

index

int

number from 0 to 2^31-1

public ExtKey deriveHardened(
int index
)

Returns

ExtKey · ExtKey object

getChainCode

Gets the chain code of Extended Key.

public byte[] getChainCode()

Returns

byte[] · Raw chain code

getPrivateEncKey

Extracts raw ECC PrivateKey.

public byte[] getPrivateEncKey()

Returns

byte[] · ECC PrivateKey

getPrivateKey

Extracts ECC PrivateKey.

public String getPrivateKey()

Returns

String · ECC key in WIF format

getPrivatePartAsBase58

Converts ExtKey to Base58 string.

public String getPrivatePartAsBase58()

Returns

String · ExtKey in Base58 format

getPublicKey

Extracts ECC PublicKey.

public String getPublicKey()

Returns

String · ECC key in BASE58DER format

getPublicKeyAsBase58Address

Extracts ECC PublicKey Address.

public String getPublicKeyAsBase58Address()

Returns

String · ECC Address in BASE58 format

getPublicPartAsBase58

Converts the public part of ExtKey to Base58 string.

public String getPublicPartAsBase58()

Returns

String · ExtKey in Base58 format

isPrivate

Checks if ExtKey is Private.

public boolean isPrivate()

Returns

boolean · returns true if ExtKey is private

verifyCompactSignatureWithHash

Validates a signature of a message.

Params

message

byte[]

data used on validation

signature

byte[]

signature of data to verify

public boolean verifyCompactSignatureWithHash(
byte[] message,
byte[] signature
)

Returns

boolean · message validation result

We use cookies on our website. We use them to ensure proper functioning of the site and, if you agree, for purposes such as analytics, marketing, and targeting ads.

PrivMX Endpoint Java v2.6

This package is not up to date with the core documentation. Some of the features you've seen described in other parts of the documentation might not be mentioned here. Those changes do not influence compatibility, however
ExtKey | PrivMX Docs