Keypair

This is the main class that used to create IOST account keyPairs.

CONSTRUCTOR


Base58 b58 = new Base58();
byte[] privateKey = b58.Decode("4o2yXazdSYFYmAEHrhN1wa28YRTQFaiheeGCYM3hySg6PnCaEBd3b4n8QHWZBDqq7f8d77tkTcrpr6tP8Do3iQ7d");
KeyPair kp = new Ed25519(privateKey);
                

constructor method is a special method for creating and initializing KeyPair class.

CONSTRUCTOR PARAMETERS

Field Type Description
secKey Btye[] private key

Returns

KeyPair object instance.

NewKeyPair


KeyPair Newkp = new Ed25519();
                

newKeyPair create new public/private key pair

Returns

KeyPair object instance.

Seckey


Base58 b58 = new Base58();
KeyPair Newkp = new Ed25519();
String NewPubKey = b58.Encode(Newkp.Seckey());
                

Seckey return current KeyPair's base 58 encode secret key.

Returns

return current KeyPair's base 58 encode secret key.

Pubkey


Base58 b58 = new Base58();
KeyPair Newkp = new Ed25519();
String NewPubKey = b58.Encode(Newkp.Pubkey());
                

Seckey return current KeyPair's base 58 encode public key.

Returns

return current KeyPair's base 58 encode public key.