|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.openfoundation.security.XPMACGenerator
public class XPMACGenerator
Use the platform libraries for creating a cryptographic hash signature (hashed message authentication code, HMAC-SHA1). This class contains code for regularizing the seed key of the HMAC generator so that it is compatible with the 5.0.x C++ implementation of MAC generation for login token creation. Note that this algorithm's MAC output does not match versions of Open Foundation previous to 2.5.2.0 (August 2004) which do not preprocess the seed key, and will not interoperate with them.
Constructor Summary | |
---|---|
XPMACGenerator()
|
Method Summary | |
---|---|
java.lang.String |
GenerateMACBase64(java.lang.String messageString)
Returns a string containing a Base64 encoding of the message authentication code bytes. |
byte[] |
GenerateMACBytes(java.lang.String messageString)
Returns a byte array containing the message authentication code. |
void |
InitializeMACGenerator(byte[] seedKeyBytes)
Initializes MAC generator from byte array seed key via application of MD5 (to shorten key length) and XOR operations. |
void |
InitializeMACGenerator(java.lang.String macSeedKey)
Convenience method to allow storing/passing seed key as a String value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XPMACGenerator()
Method Detail |
---|
public void InitializeMACGenerator(java.lang.String macSeedKey)
macSeedKey
- String seed key via application of MD5.public void InitializeMACGenerator(byte[] seedKeyBytes)
seedKeyBytes
- byte array of seed key data.public byte[] GenerateMACBytes(java.lang.String messageString)
messageString
- The String to be encoded.
public java.lang.String GenerateMACBase64(java.lang.String messageString)
messageString
- The String to be encoded.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |