Package ch.bitagent.bitcoin.lib.ecc
Class PrivateKey
- java.lang.Object
-
- ch.bitagent.bitcoin.lib.ecc.PrivateKey
-
public class PrivateKey extends Object
A private key on a secp256k1 elliptic curve
-
-
Constructor Summary
Constructors Constructor Description PrivateKey(Int secret)Constructor for PrivateKey.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IntdeterministicK(Int z, int counter)deterministicK.S256PointgetPoint()Get the point (public key)IntgetSecret()Get the secretstatic PrivateKeyparse(byte[] secret)parsestatic PrivateKeyparseWif(String wif, boolean compressed, boolean testnet)parseWifSignaturesign(Int z, int counter)sign.Stringwif(boolean compressed, boolean testnet)wif.
-
-
-
Method Detail
-
parse
public static PrivateKey parse(byte[] secret)
parse- Parameters:
secret- .- Returns:
- .
-
deterministicK
public Int deterministicK(Int z, int counter)
deterministicK.
- Parameters:
z- .counter- .- Returns:
- a .
-
wif
public String wif(boolean compressed, boolean testnet)
wif.
- Parameters:
compressed- a booleantestnet- a boolean- Returns:
- a
Stringobject
-
parseWif
public static PrivateKey parseWif(String wif, boolean compressed, boolean testnet)
parseWif- Parameters:
wif- .compressed- .testnet- .- Returns:
- .
-
getSecret
public Int getSecret()
Get the secret- Returns:
- .
-
-