Class MacDigestManager
- java.lang.Object
-
- org.apache.bookkeeper.proto.checksum.DigestManager
-
- org.apache.bookkeeper.proto.checksum.MacDigestManager
-
public class MacDigestManager extends DigestManager
ASHA-1based digest manager.NOTE: This class is tended to be used by this project only. External users should not rely on it directly.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.bookkeeper.proto.checksum.DigestManager
DigestManager.RecoveryData
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDIGEST_ALGORITHM(package private) static byte[]EMPTY_LEDGER_KEYstatic java.lang.StringKEY_ALGORITHMstatic intMAC_CODE_LENGTH(package private) byte[]passwd-
Fields inherited from class org.apache.bookkeeper.proto.checksum.DigestManager
LAC_METADATA_LENGTH, ledgerId, macCodeLength, METADATA_LENGTH, useV2Protocol
-
-
Constructor Summary
Constructors Constructor Description MacDigestManager(long ledgerId, byte[] passwd, boolean useV2Protocol, io.netty.buffer.ByteBufAllocator allocator)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) booleanacceptsMemoryAddressBuffer()static byte[]genDigest(java.lang.String pad, byte[] passwd)(package private) intgetMacCodeLength()(package private) intinternalUpdate(int digest, byte[] buffer, int offset, int len)(package private) intinternalUpdate(int digest, io.netty.buffer.ByteBuf data, int offset, int len)(package private) booleanisInt32Digest()(package private) voidpopulateValueAndReset(int digest, io.netty.buffer.ByteBuf buffer)-
Methods inherited from class org.apache.bookkeeper.proto.checksum.DigestManager
computeDigestAndPackageForSending, computeDigestAndPackageForSendingLac, generateMasterKey, instantiate, update, verifyDigestAndReturnData, verifyDigestAndReturnLac, verifyDigestAndReturnLastConfirmed
-
-
-
-
Field Detail
-
DIGEST_ALGORITHM
public static final java.lang.String DIGEST_ALGORITHM
- See Also:
- Constant Field Values
-
KEY_ALGORITHM
public static final java.lang.String KEY_ALGORITHM
- See Also:
- Constant Field Values
-
MAC_CODE_LENGTH
public static final int MAC_CODE_LENGTH
- See Also:
- Constant Field Values
-
passwd
final byte[] passwd
-
EMPTY_LEDGER_KEY
static final byte[] EMPTY_LEDGER_KEY
-
-
Method Detail
-
genDigest
public static byte[] genDigest(java.lang.String pad, byte[] passwd) throws java.security.NoSuchAlgorithmException- Throws:
java.security.NoSuchAlgorithmException
-
getMacCodeLength
int getMacCodeLength()
- Specified by:
getMacCodeLengthin classDigestManager
-
populateValueAndReset
void populateValueAndReset(int digest, io.netty.buffer.ByteBuf buffer)- Specified by:
populateValueAndResetin classDigestManager
-
internalUpdate
int internalUpdate(int digest, io.netty.buffer.ByteBuf data, int offset, int len)- Specified by:
internalUpdatein classDigestManager
-
internalUpdate
int internalUpdate(int digest, byte[] buffer, int offset, int len)- Specified by:
internalUpdatein classDigestManager
-
isInt32Digest
boolean isInt32Digest()
- Specified by:
isInt32Digestin classDigestManager
-
acceptsMemoryAddressBuffer
boolean acceptsMemoryAddressBuffer()
- Specified by:
acceptsMemoryAddressBufferin classDigestManager
-
-