|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.bitcoin.crypto.EncryptedPrivateKey
public class EncryptedPrivateKey
An EncryptedPrivateKey contains the information produced after encrypting the private key bytes of an ECKey.
It contains two member variables - initialisationVector and encryptedPrivateBytes. The initialisationVector is a randomly chosen list of bytes that were used to initialise the AES block cipher when the private key bytes were encrypted. You need these for decryption. The encryptedPrivateBytes are the result of AES encrypting the private keys using an AES key that is derived from a user entered password. You need the password to recreate the AES key in order to decrypt these bytes.
| Constructor Summary | |
|---|---|
EncryptedPrivateKey(byte[] initialisationVector,
byte[] encryptedPrivateKeys)
|
|
EncryptedPrivateKey(EncryptedPrivateKey encryptedPrivateKey)
Cloning constructor. |
|
| Method Summary | |
|---|---|
void |
clear()
Clears all the EncryptedPrivateKey contents from memory (overwriting all data including PRIVATE KEYS). |
EncryptedPrivateKey |
clone()
|
boolean |
equals(Object obj)
|
byte[] |
getEncryptedBytes()
|
byte[] |
getInitialisationVector()
|
int |
hashCode()
|
void |
setEncryptedPrivateBytes(byte[] encryptedPrivateBytes)
Set the encrypted private key bytes, cloning them. |
void |
setInitialisationVector(byte[] initialisationVector)
Set the initialisationVector, cloning the bytes. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public EncryptedPrivateKey(EncryptedPrivateKey encryptedPrivateKey)
encryptedPrivateKey - EncryptedPrivateKey to clone.
public EncryptedPrivateKey(byte[] initialisationVector,
byte[] encryptedPrivateKeys)
iv - encryptedPrivateKeys - | Method Detail |
|---|
public byte[] getInitialisationVector()
public void setInitialisationVector(byte[] initialisationVector)
initialisationVector - public byte[] getEncryptedBytes()
public void setEncryptedPrivateBytes(byte[] encryptedPrivateBytes)
encryptedPrivateBytes - public EncryptedPrivateKey clone()
clone in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Objectpublic void clear()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||