See RFC 3174.
| Modifier and Type | Class and Description |
|---|---|
| public static enum | SHA1.
SHA1 implementations available in JGit |
| Modifier and Type | Field and Description |
|---|---|
| private static final SHA1. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public abstract byte[] | |
| public abstract void | digest(MutableObjectId
destination to copy the digest to. id)Finish the digest and return the resulting hash. |
| private static SHA1. | |
| private static SHA1. | |
| public abstract boolean | |
| public static SHA1 | Returns: a new context to compute a SHA-1 hash of data.Create a new context to compute a SHA-1 hash of data. |
| public abstract SHA1 | |
| public abstract SHA1 | |
| public abstract ObjectId | Returns: the ObjectId for the resulting hash.Finish the digest and return the resulting hash. |
| public abstract void | |
| public abstract void | |
| public abstract void | update(byte[]
input array of bytes. in, int offset to start at from p, int in.number of bytes to hash. len)Update the digest computation by adding bytes to the message. |
| SHA1_IMPLEMENTATION | back to summary |
|---|---|
| private static final SHA1. | |
| SHA1 | back to summary |
|---|---|
| public SHA1() | |
| digest | back to summary |
|---|---|
| public abstract byte[] digest() throws Sha1CollisionException Finish the digest and return the resulting hash.
Once
| |
| digest | back to summary |
|---|---|
| public abstract void digest(MutableObjectId id) throws Sha1CollisionException Finish the digest and return the resulting hash.
Once
| |
| fromConfig | back to summary |
|---|---|
| private static SHA1. | |
| getImplementation | back to summary |
|---|---|
| private static SHA1. | |
| hasCollision | back to summary |
|---|---|
| public abstract boolean hasCollision() 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
| |
| newInstance | back to summary |
|---|---|
| public static SHA1 newInstance() Create a new context to compute a SHA-1 hash of data.
If
| |
| reset | back to summary |
|---|---|
| public abstract SHA1 reset() Reset this instance to compute another hash.
| |
| setDetectCollision | back to summary |
|---|---|
| public abstract SHA1 setDetectCollision(boolean detect) 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 abstract ObjectId toObjectId() throws Sha1CollisionException Finish the digest and return the resulting hash.
Once
| |
| update | back to summary |
|---|---|
| public abstract void update(byte b) Update the digest computation by adding a byte.
| |
| update | back to summary |
|---|---|
| public abstract void update(byte[] in) Update the digest computation by adding bytes to the message.
| |
| update | back to summary |
|---|---|
| public abstract void update(byte[] in, int p, int len) Update the digest computation by adding bytes to the message.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| public static final SHA1. | |
| public static final SHA1. | JDKNATIVE
Native implementation based on JDK's |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public String | toString()
Overrides java. Returns the name of this enum constant, as contained in the declaration. |
| public static SHA1. | |
| public static SHA1. |
| implClassName | back to summary |
|---|---|
| private final String implClassName | |
| JAVA | back to summary |
|---|---|
| public static final SHA1.
| |
| JDKNATIVE | back to summary |
|---|---|
| public static final SHA1. Native implementation based on JDK's | |
| Sha1Implementation | back to summary |
|---|---|
| private Sha1Implementation(Class<T> implClass) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns the name of this enum constant, as contained in the declaration. This method may be overridden, though it typically isn't necessary or desirable. An enum class should override this method when a more "programmer-friendly" string form exists. | |
| valueOf | back to summary |
|---|---|
| public static SHA1. | |
| values | back to summary |
|---|---|
| public static SHA1. | |