public class ChecksumHandler extends Object
Constructor and Description |
---|
ChecksumHandler() |
Modifier and Type | Method and Description |
---|---|
Checksum |
calculateChecksum(ChecksumType checksumType,
byte[] bytes,
byte[] key,
KeyUsage usage)
Calculate a checksum based on raw bytes and an (optional) key for keyed checksums.
|
void |
verifyChecksum(Checksum checksum,
byte[] bytes,
byte[] key,
KeyUsage usage)
Verify a checksum by providing the raw bytes and an (optional) key for keyed checksums.
|
public ChecksumHandler()
public Checksum calculateChecksum(ChecksumType checksumType, byte[] bytes, byte[] key, KeyUsage usage) throws KerberosException
checksumType
- The type of checksum to usebytes
- The datakey
- The keyusage
- The key usageChecksum
.KerberosException
- If the checksum can't be cmputedpublic void verifyChecksum(Checksum checksum, byte[] bytes, byte[] key, KeyUsage usage) throws KerberosException
checksum
- The checksum to verifybytes
- The datakey
- The keyusage
- The key usageKerberosException
- If the verification failedCopyright © 2003–2020 The Apache Software Foundation. All rights reserved.