| Modifier and Type | Field and Description |
|---|---|
| private final MessageDigest |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public byte[] | digest()
Implements abstract org. Finish the digest and return the resulting hash. |
| public void | digest(MutableObjectId
destination to copy the digest to. id)Implements abstract org. Finish the digest and return the resulting hash. |
| public boolean | hasCollision()
Implements abstract org. Check if a collision was detected. |
| public SHA1 | reset()
Implements abstract org. Reset this instance to compute another hash. |
| public SHA1 | setDetectCollision(boolean
a boolean. detect)Implements abstract org. Enable likely collision detection. |
| public ObjectId | toObjectId()
Implements abstract org. Finish the digest and return the resulting hash. |
| public void | update(byte
a byte. b)Implements abstract org. Update the digest computation by adding a byte. |
| public void | update(byte[]
input array of bytes. in)Implements abstract org. Update the digest computation by adding bytes to the message. |
| public void | update(byte[]
input array of bytes. in, int offset to start at from p, int in.number of bytes to hash. len)Implements abstract org. Update the digest computation by adding bytes to the message. |
| md | back to summary |
|---|---|
| private final MessageDigest md | |
| SHA1Native | back to summary |
|---|---|
| pack-priv SHA1Native() | |
| digest | back to summary |
|---|---|
| public byte[] digest() throws Sha1CollisionException Implements abstract org. Doc from org. Finish the digest and return the resulting hash.
Once
| |
| digest | back to summary |
|---|---|
| public void digest(MutableObjectId id) throws Sha1CollisionException Implements abstract org. Doc from org. Finish the digest and return the resulting hash.
Once
| |
| hasCollision | back to summary |
|---|---|
| public boolean hasCollision() Implements abstract org. Doc from org. Check if a collision was detected. This method only returns an accurate
result after the digest was obtained through
Implementations not supporting collision detection always return
| |
| reset | back to summary |
|---|---|
| public SHA1 reset() Implements abstract org. Doc from org. Reset this instance to compute another hash. | |
| setDetectCollision | back to summary |
|---|---|
| public SHA1 setDetectCollision(boolean detect) Implements abstract org. Doc from org. Enable likely collision detection.
Default for implementations supporting collision detection is
Implementations not supporting collision detection ignore calls to this method. | |
| toObjectId | back to summary |
|---|---|
| public ObjectId toObjectId() throws Sha1CollisionException Implements abstract org. Doc from org. Finish the digest and return the resulting hash.
Once
| |
| update | back to summary |
|---|---|
| public void update(byte b) Implements abstract org. Doc from org. Update the digest computation by adding a byte.
| |
| update | back to summary |
|---|---|
| public void update(byte[] in) Implements abstract org. Doc from org. Update the digest computation by adding bytes to the message.
| |
| update | back to summary |
|---|---|
| public void update(byte[] in, int p, int len) Implements abstract org. Doc from org. Update the digest computation by adding bytes to the message.
| |