DataStructurepublic class Signature extends SimpleDataStructure
| 修飾子とタイプ | フィールド | 説明 |
|---|---|---|
static byte[] |
FAKE_SIGNATURE |
推奨されていません。
to be removed
|
static int |
SIGNATURE_BYTES |
40
|
_data| コンストラクタ | 説明 |
|---|---|
Signature() |
|
Signature(byte[] data) |
|
Signature(SigType type) |
Unknown type not allowed as we won't know the length to read in the data.
|
Signature(SigType type,
byte[] data) |
Should we allow an unknown type here?
|
| 修飾子とタイプ | メソッド | 説明 |
|---|---|---|
boolean |
equals(java.lang.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
|
java.lang.String |
toString() |
readcalculateHash, fromBase64, fromByteArray, getData, readBytes, setData, toBase64, toByteArray, writeBytespublic static final int SIGNATURE_BYTES
@Deprecated public static final byte[] FAKE_SIGNATURE
public Signature()
public Signature(SigType type)
type - non-nullpublic Signature(byte[] data)
public Signature(SigType type, byte[] data)
type - non-nullpublic int length()
SimpleDataStructurelength クラス内 SimpleDataStructurepublic SigType getType()
public java.lang.String toString()
toString クラス内 SimpleDataStructurepublic int hashCode()
SimpleDataStructurehashCode クラス内 SimpleDataStructurepublic boolean equals(java.lang.Object obj)
SimpleDataStructureequals クラス内 SimpleDataStructure