Serializable
, DataStructure
RSASigningPrivateCrtKey
public class SigningPrivateKey extends SimpleDataStructure
Modifier and Type | Field | Description |
---|---|---|
static int |
KEYSIZE_BYTES |
_data
Constructor | Description |
---|---|
SigningPrivateKey() |
|
SigningPrivateKey(byte[] data) |
|
SigningPrivateKey(String base64Data) |
constructs from base64
|
SigningPrivateKey(SigType type) |
|
SigningPrivateKey(SigType type,
byte[] data) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(Object obj) |
Warning - this returns true for two different classes with the same size
and same data, e.g.
|
SigType |
getType() |
|
int |
hashCode() |
We assume the data has enough randomness in it, so use the first 4 bytes for speed.
|
int |
length() |
The legal length of the byte array in this data structure
|
SigningPublicKey |
toPublic() |
Converts this signing private key to its public equivalent.
|
String |
toString() |
read
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
calculateHash, fromBase64, fromByteArray, getData, readBytes, setData, toBase64, toByteArray, writeBytes
public SigningPrivateKey()
public SigningPrivateKey(SigType type)
public SigningPrivateKey(byte[] data)
public SigningPrivateKey(SigType type, byte[] data)
public SigningPrivateKey(String base64Data) throws DataFormatException
base64Data
- a string of base64 data (the output of .toBase64() called
on a prior instance of SigningPrivateKeyDataFormatException
public int length()
SimpleDataStructure
length
in class SimpleDataStructure
public SigType getType()
public SigningPublicKey toPublic()
IllegalArgumentException
- on bad key or unknown or unsupported typepublic String toString()
toString
in class SimpleDataStructure
public int hashCode()
SimpleDataStructure
hashCode
in class SimpleDataStructure
public boolean equals(Object obj)
SimpleDataStructure
equals
in class SimpleDataStructure