org.mobicents.slee.resource.parlay.util.crypto
Class CHAPUtil

java.lang.Object
  extended by org.mobicents.slee.resource.parlay.util.crypto.CHAPUtil

public class CHAPUtil
extends java.lang.Object

This class provides utility methods for the creation, use and storage of RSA public and private keys.


Constructor Summary
CHAPUtil()
           
 
Method Summary
 byte[] generateCHAPRequestPacket(byte[] challenge)
          used to build the CHAP Request Packet
 byte[] generateCHAPResponsePacket(byte identifier, byte[] challenge, byte[] responseName)
          used to build the CHAP response packet
 byte[] generateMD5HashChallenge(byte request_id, java.lang.String sharedSecret, byte[] challenge)
          Takes the challenge id, shared secret and the challenge and performs a MD5 Hash operation on it
protected  java.security.MessageDigest getMd5Digest()
          Returns a MD5 digest.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CHAPUtil

public CHAPUtil()
Method Detail

generateCHAPRequestPacket

public byte[] generateCHAPRequestPacket(byte[] challenge)
used to build the CHAP Request Packet

Parameters:
challenge -
Returns:

generateCHAPResponsePacket

public byte[] generateCHAPResponsePacket(byte identifier,
                                         byte[] challenge,
                                         byte[] responseName)
used to build the CHAP response packet

Parameters:
identifier -
challenge -
responseName -
Returns:

generateMD5HashChallenge

public byte[] generateMD5HashChallenge(byte request_id,
                                       java.lang.String sharedSecret,
                                       byte[] challenge)
                                throws java.security.NoSuchAlgorithmException
Takes the challenge id, shared secret and the challenge and performs a MD5 Hash operation on it

Parameters:
request_id -
sharedSecret -
challenge -
Returns:
Throws:
java.security.NoSuchAlgorithmException

getMd5Digest

protected java.security.MessageDigest getMd5Digest()
                                            throws java.security.NoSuchAlgorithmException
Returns a MD5 digest.

Returns:
MessageDigest object
Throws:
java.security.NoSuchAlgorithmException


Copyright © 2009. All Rights Reserved.