com.cisco.provisioning.cpe.extensions.configuration
Class PacketCableTFTPCrypto

java.lang.Object
  extended by com.cisco.provisioning.cpe.extensions.configuration.PacketCableTFTPCrypto

public class PacketCableTFTPCrypto
extends Object

Singelton class that wraps the BouncyCastle JCE provider for some PacketCable operations.


Method Summary
static PacketCableTFTPCrypto getInstance()
          Singelton accessor.
 byte[] getSHA1(byte[] buf, int offset, int buflen)
          Calculate the SHA1 digest of a binary buffer.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static PacketCableTFTPCrypto getInstance()
Singelton accessor.

Returns:
the PacketCableTFTPCrypto instance.

getSHA1

public byte[] getSHA1(byte[] buf,
                      int offset,
                      int buflen)
               throws NoSuchAlgorithmException,
                      NoSuchProviderException
Calculate the SHA1 digest of a binary buffer.

Parameters:
buf - the binary upon which the digest will be calculated.
offset - start calculation at this offset.
buflen - calculate offset for this number of bytes.
Returns:
the SHA1 digest calculation.
Throws:
NoSuchAlgorithmException
NoSuchProviderException