DataStructure
public class PrivateKey extends SimpleDataStructure
修飾子とタイプ | フィールド | 説明 |
---|---|---|
static int |
KEYSIZE_BYTES |
_data
コンストラクタ | 説明 |
---|---|
PrivateKey() |
|
PrivateKey(byte[] data) |
|
PrivateKey(java.lang.String base64Data) |
constructs from base64
|
修飾子とタイプ | メソッド | 説明 |
---|---|---|
boolean |
equals(java.lang.Object obj) |
Warning - this returns true for two different classes with the same size
and same data, e.g.
|
int |
hashCode() |
We assume the data has enough randomness in it, so use the last 4 bytes for speed.
|
int |
length() |
The legal length of the byte array in this data structure
|
PublicKey |
toPublic() |
derives a new PublicKey object derived from the secret contents
of this PrivateKey
|
read
calculateHash, fromBase64, fromByteArray, getData, readBytes, setData, toBase64, toByteArray, toString, writeBytes
public static final int KEYSIZE_BYTES
public PrivateKey()
public PrivateKey(byte[] data)
public PrivateKey(java.lang.String base64Data) throws DataFormatException
base64Data
- a string of base64 data (the output of .toBase64() called
on a prior instance of PrivateKeyDataFormatException
public int length()
SimpleDataStructure
length
クラス内 SimpleDataStructure
public PublicKey toPublic()
java.lang.IllegalArgumentException
- on bad keypublic int hashCode()
hashCode
クラス内 SimpleDataStructure
public boolean equals(java.lang.Object obj)
SimpleDataStructure
equals
クラス内 SimpleDataStructure