Package org.bitcoinj.crypto
Class BIP38PrivateKey
- java.lang.Object
 - 
- org.bitcoinj.crypto.EncodedPrivateKey
 - 
- org.bitcoinj.crypto.BIP38PrivateKey
 
 
 
- 
public class BIP38PrivateKey extends EncodedPrivateKey
Implementation of BIP 38 passphrase-protected private keys. Currently, only decryption is supported. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBIP38PrivateKey.BadPassphraseException 
- 
Field Summary
Fields Modifier and Type Field Description byte[]addressHashbooleancompressedbyte[]contentbooleanecMultiplybooleanhasLotAndSequence- 
Fields inherited from class org.bitcoinj.crypto.EncodedPrivateKey
bytes, network 
 - 
 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ECKeydecrypt(java.lang.String passphrase)static BIP38PrivateKeyfromBase58(Network network, java.lang.String base58)Construct a password-protected private key from its Base58 representation.static BIP38PrivateKeyfromBase58(NetworkParameters params, java.lang.String base58)Deprecated.java.lang.StringtoBase58()Returns the base58-encoded textual form, including version and checksum bytes.java.lang.StringtoString()- 
Methods inherited from class org.bitcoinj.crypto.EncodedPrivateKey
equals, getParameters, hashCode, network 
 - 
 
 - 
 
- 
- 
Method Detail
- 
fromBase58
public static BIP38PrivateKey fromBase58(Network network, java.lang.String base58) throws AddressFormatException
Construct a password-protected private key from its Base58 representation.- Parameters:
 network- The network of the chain that the key is for.base58- The textual form of the password-protected private key.- Throws:
 AddressFormatException- if the given base58 doesn't parse or the checksum is invalid
 
- 
fromBase58
@Deprecated public static BIP38PrivateKey fromBase58(NetworkParameters params, java.lang.String base58) throws AddressFormatException
Deprecated.Construct a password-protected private key from its Base58 representation.- Parameters:
 params- The network of the chain that the key is for.base58- The textual form of the password-protected private key.- Throws:
 AddressFormatException- if the given base58 doesn't parse or the checksum is invalid
 
- 
toBase58
public java.lang.String toBase58()
Returns the base58-encoded textual form, including version and checksum bytes.- Returns:
 - textual form
 
 
- 
decrypt
public ECKey decrypt(java.lang.String passphrase) throws BIP38PrivateKey.BadPassphraseException
 
- 
toString
public java.lang.String toString()
- Overrides:
 toStringin classjava.lang.Object
 
 - 
 
 -