DataStructurepublic class SigningPublicKey extends SimpleDataStructure
| 修飾子とタイプ | フィールド | 説明 |
|---|---|---|
static int |
KEYSIZE_BYTES |
_data| コンストラクタ | 説明 |
|---|---|
SigningPublicKey() |
|
SigningPublicKey(byte[] data) |
|
SigningPublicKey(java.lang.String base64Data) |
constructs from base64
|
SigningPublicKey(SigType type) |
|
SigningPublicKey(SigType type,
byte[] data) |
| 修飾子とタイプ | メソッド | 説明 |
|---|---|---|
static void |
clearCache() |
|
static SigningPublicKey |
create(byte[] data,
int off) |
Pull from cache or return new.
|
static SigningPublicKey |
create(java.io.InputStream in) |
Pull from cache or return new
|
boolean |
equals(java.lang.Object obj) |
Warning - this returns true for two different classes with the same size
and same data, e.g.
|
byte[] |
getPadding(KeyCertificate kcert) |
Get the portion of this (type 0) SPK that is really padding based on the Key Cert type given,
if any
|
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
|
java.lang.String |
toString() |
|
SigningPublicKey |
toTypedKey(KeyCertificate kcert) |
Up-convert this from an untyped (type 0) SPK to a typed SPK based on the Key Cert given.
|
void |
writeTruncatedBytes(java.io.OutputStream out) |
Write the data up to a max of 128 bytes.
|
readcalculateHash, fromBase64, fromByteArray, getData, readBytes, setData, toBase64, toByteArray, writeBytespublic SigningPublicKey()
public SigningPublicKey(SigType type)
type - if null, type is unknownpublic SigningPublicKey(byte[] data)
public SigningPublicKey(SigType type, byte[] data)
type - if null, type is unknownpublic SigningPublicKey(java.lang.String base64Data)
throws DataFormatException
base64Data - a string of base64 data (the output of .toBase64() called
on a prior instance of SigningPublicKeyDataFormatExceptionpublic static SigningPublicKey create(byte[] data, int off)
java.lang.ArrayIndexOutOfBoundsException - if not enough bytes, FIXME should throw DataFormatExceptionpublic static SigningPublicKey create(java.io.InputStream in) throws java.io.IOException
java.io.IOExceptionpublic int length()
SimpleDataStructurelength クラス内 SimpleDataStructurepublic SigType getType()
public SigningPublicKey toTypedKey(KeyCertificate kcert)
java.lang.IllegalArgumentException - if this is already typed to a different typepublic byte[] getPadding(KeyCertificate kcert)
java.lang.IllegalArgumentException - if this is already typed to a different typepublic void writeTruncatedBytes(java.io.OutputStream out)
throws DataFormatException,
java.io.IOException
DataFormatExceptionjava.io.IOExceptionpublic java.lang.String toString()
toString クラス内 SimpleDataStructurepublic static void clearCache()
public int hashCode()
SimpleDataStructurehashCode クラス内 SimpleDataStructurepublic boolean equals(java.lang.Object obj)
SimpleDataStructureequals クラス内 SimpleDataStructure