DataStructure
public 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() |
read
calculateHash, fromBase64, fromByteArray, getData, readBytes, setData, toBase64, toByteArray, writeBytes
public 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()
SimpleDataStructure
length
クラス内 SimpleDataStructure
public SigType getType()
public java.lang.String toString()
toString
クラス内 SimpleDataStructure
public int hashCode()
SimpleDataStructure
hashCode
クラス内 SimpleDataStructure
public boolean equals(java.lang.Object obj)
SimpleDataStructure
equals
クラス内 SimpleDataStructure