Top Description Fields Constructors Methods
org.eclipse.jgit.internal.storage.io

public final Class NullMessageDigest

extends MessageDigest
Class Inheritance
Imports
java.security.MessageDigest, org.eclipse.jgit.lib.Constants

Dummy message digest consisting of only null bytes with the length of an ObjectId. This class can be used to skip computing a real digest.

Field Summary

Modifier and TypeField and Description
private static final byte[]
private static final NullMessageDigest

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
protected byte[]
engineDigest()

Implements abstract java.security.MessageDigestSpi.engineDigest.

Completes the hash computation by performing final operations such as padding.

protected void
engineReset()

Implements abstract java.security.MessageDigestSpi.engineReset.

Resets the digest for further use.

protected void
engineUpdate(byte
the byte to use for the update.
input
)

Implements abstract java.security.MessageDigestSpi.engineUpdate.

Updates the digest using the specified byte.

protected void
engineUpdate(byte[]
the array of bytes to use for the update.
input
,
int
the offset to start from in the array of bytes.
offset
,
int
the number of bytes to use, starting at offset.
len
)

Implements abstract java.security.MessageDigestSpi.engineUpdate.

Updates the digest using the specified array of bytes, starting at the specified offset.

public static MessageDigest

Returns:

the only instance of NullMessageDigest
getInstance
()

Get the only instance of NullMessageDigest

Inherited from java.security.MessageDigest:
clonedigestdigestdigestgetAlgorithmgetDigestLengthgetInstancegetInstancegetInstancegetProviderisEqualresettoStringupdateupdateupdateupdate

Field Detail

digestback to summary
private static final byte[] digest
INSTANCEback to summary
private static final NullMessageDigest INSTANCE

Constructor Detail

NullMessageDigestback to summary
private NullMessageDigest()

Method Detail

engineDigestback to summary
protected byte[] engineDigest()

Implements abstract java.security.MessageDigestSpi.engineDigest.

Doc from java.security.MessageDigestSpi.engineDigest.

Completes the hash computation by performing final operations such as padding. Once engineDigest has been called, the engine should be reset (see engineReset). Resetting is the responsibility of the engine implementor.

Returns:byte[]

the array of bytes for the resulting hash value.

Annotations
@Override
engineResetback to summary
protected void engineReset()

Implements abstract java.security.MessageDigestSpi.engineReset.

Doc from java.security.MessageDigestSpi.engineReset.

Resets the digest for further use.

Annotations
@Override
engineUpdateback to summary
protected void engineUpdate(byte input)

Implements abstract java.security.MessageDigestSpi.engineUpdate.

Doc from java.security.MessageDigestSpi.engineUpdate.

Updates the digest using the specified byte.

Parameters
input:byte

the byte to use for the update.

Annotations
@Override
engineUpdateback to summary
protected void engineUpdate(byte[] input, int offset, int len)

Implements abstract java.security.MessageDigestSpi.engineUpdate.

Doc from java.security.MessageDigestSpi.engineUpdate.

Updates the digest using the specified array of bytes, starting at the specified offset.

Parameters
input:byte[]

the array of bytes to use for the update.

offset:int

the offset to start from in the array of bytes.

len:int

the number of bytes to use, starting at offset.

Annotations
@Override
getInstanceback to summary
public static MessageDigest getInstance()

Get the only instance of NullMessageDigest

Returns:MessageDigest

the only instance of NullMessageDigest