org.apache.directory.server.kerberos.shared.crypto.checksum
Class ChecksumHandler

java.lang.Object
  extended by org.apache.directory.server.kerberos.shared.crypto.checksum.ChecksumHandler

public class ChecksumHandler
extends Object

A Hashed Adapter encapsulating checksum engines for performing integrity checks.

Author:
Apache Directory Project

Constructor Summary
ChecksumHandler()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChecksumHandler

public ChecksumHandler()
Method Detail

calculateChecksum

public Checksum calculateChecksum(ChecksumType checksumType,
                                  byte[] bytes,
                                  byte[] key,
                                  KeyUsage usage)
                           throws KerberosException
Calculate a checksum based on raw bytes and an (optional) key for keyed checksums.

Parameters:
checksumType -
bytes -
key -
usage -
Returns:
The Checksum.
Throws:
KerberosException

verifyChecksum

public void verifyChecksum(Checksum checksum,
                           byte[] bytes,
                           byte[] key,
                           KeyUsage usage)
                    throws KerberosException
Verify a checksum by providing the raw bytes and an (optional) key for keyed checksums.

Parameters:
checksum -
bytes -
key -
usage -
Throws:
KerberosException


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.