DataStructurepublic class SHA1Hash extends SimpleDataStructure
| 修飾子とタイプ | フィールド | 説明 |
|---|---|---|
static int |
HASH_LENGTH |
_data| 修飾子とタイプ | メソッド | 説明 |
|---|---|---|
int |
hashCode() |
a Hash is a hash, so just use the first 4 bytes for speed
|
int |
length() |
The legal length of the byte array in this data structure
|
void |
readBytes(java.io.InputStream in) |
Sets the data.
|
void |
setData(byte[] data) |
Sets the data.
|
readcalculateHash, equals, fromBase64, fromByteArray, getData, toBase64, toByteArray, toString, writeBytespublic static final int HASH_LENGTH
public SHA1Hash()
public SHA1Hash(byte[] data)
java.lang.IllegalArgumentException - if data is not 20 bytes (null is ok)public int length()
SimpleDataStructurelength クラス内 SimpleDataStructurepublic void setData(byte[] data)
SimpleDataStructuresetData クラス内 SimpleDataStructuredata - of correct length, or nulljava.lang.IllegalArgumentException - if data is not 20 bytes (null is ok)public void readBytes(java.io.InputStream in)
throws DataFormatException,
java.io.IOException
SimpleDataStructurereadBytes インタフェース内 DataStructurereadBytes クラス内 SimpleDataStructurein - the stream to readDataFormatException - if the data is improperly formattedjava.io.IOException - if there was a problem reading the streampublic int hashCode()
hashCode クラス内 SimpleDataStructure