java.lang.Object
cryptix.sasl.otp.OTPDigest
- final class OTPDigest
- extends java.lang.Object
This object encapsulates the concrete implementation of the Message
Digest Algorithm instance used by an incarnation of an OTP session.
- Since:
- draft-burdis-cat-sasl-srp-04
- Version:
- $Revision: 1.3 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cat
private static org.apache.log4j.Category cat
digestLength
private int digestLength
- The size of the output (in bytes) of the underlying OTP message digest
algorithm.
md
private java.security.MessageDigest md
- The root of all instances of the underlying OTP message digest
algorithm.
In this code of the OTP protocol we use Sun's SHA implementation.
In later version this will change to use any provider's
implementation but we shall add some verification tests (known
test vectors) to ensure it is reliable.
digestName
private java.lang.String digestName
OTPDigest
private OTPDigest(java.security.MessageDigest md,
java.lang.String mdaName)
- Trivial private constructor to enforce Singleton pattern.
getInstance
static OTPDigest getInstance(java.lang.String mdaName)
getDigestLength
int getDigestLength()
- Return the size of the output, in bytes, of the message digest algorithm.
getDigestName
java.lang.String getDigestName()
newDigest
java.security.MessageDigest newDigest()
- Returns a new instance of the OTP message digest algorithm --which is
SHA-1 by default, but could be anything else provided the proper
conditions as specified in the OTP specifications.