|
Oracle Security Developer Tools Crypto Java API Reference 10g Release 3 (10.1.3) B25378-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
oracle.security.crypto.core.MessageDigest
oracle.security.crypto.core.PasswordBasedMAC
The password-base MAC algorithm, as defined in CRMF (RFC 2511).
PBMacAlgID| Nested Class Summary |
| Nested classes inherited from class oracle.security.crypto.core.MessageDigest |
MessageDigest.MDState |
| Field Summary | |
static int |
DEFAULT_ITER_COUNTDefault password-based key derivation iteration count. |
static AlgorithmIdentifier |
DEFAULT_MACDefault password-based MAC algorithm is HMAC-SHA. |
static AlgorithmIdentifier |
DEFAULT_OWFDefault password-based key derivation hash function is SHA-1. |
static int |
DEFAULT_SALT_LENDefault password-based key derivation salt length. |
| Fields inherited from class oracle.security.crypto.core.MessageDigest |
algID, digestBits, digestValid |
| Constructor Summary | |
PasswordBasedMAC() |
|
PasswordBasedMAC(AlgorithmIdentifier algID, byte[] password) |
|
PasswordBasedMAC(AlgorithmIdentifier algID, byte[] password, RandomBitsSource rbs)Use this constructor if algID does not contain parameters -- the RandomBitsSource will be used to generate the salt bytes. |
|
PasswordBasedMAC(byte[] password) |
|
| Method Summary | |
java.lang.String |
algName()Returns the algorithm name of this message digest. |
int |
blockSize() |
java.lang.Object |
clone()Returns a clone of this message digest object. |
void |
computeCurrent()Completes the hash computation, performing any necessary operations such as padding. |
AlgorithmIdentifier |
getAlgID()Returns the algorithm identifier for this PasswordBasedMAC. |
int |
getCount() |
int |
getDigestLength()Returns the length in bytes of the message digest. |
AlgorithmIdentifier |
getMacAlgID() |
AlgorithmIdentifier |
getOwfAlgID() |
byte[] |
getSalt() |
protected MessageDigest.MDState |
getState() |
void |
init()Resets this message digest object to its initial state. |
void |
setAlgID(AlgorithmIdentifier algID) |
void |
setCount(int count) |
void |
setMacAlgID(AlgorithmIdentifier macAlgID) |
void |
setOwfAlgID(AlgorithmIdentifier owfAlgID) |
void |
setPassword(byte[] password) |
void |
setRandomBitsSource(RandomBitsSource rbs) |
void |
setSalt(byte[] salt) |
protected void |
setState(MessageDigest.MDState state) |
void |
update(byte b)Adds the specifed byte to the data being digested. |
void |
update(byte[] input, int off, int len)Adds the specified sequence of bytes to the data being digested. |
| Methods inherited from class oracle.security.crypto.core.MessageDigest |
computeDigest, computeDigest, getDigestBits, getInstance, isEqual, isEqual, toString, update, update, update, update, update, update, update, update, update, update, updateASCII |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int DEFAULT_SALT_LEN
PKCS5.DEFAULT_SALT_LEN, Constant Field Valuespublic static final AlgorithmIdentifier DEFAULT_OWF
public static final int DEFAULT_ITER_COUNT
PKCS5.DEFAULT_ITER_COUNT, Constant Field Valuespublic static final AlgorithmIdentifier DEFAULT_MAC
| Constructor Detail |
public PasswordBasedMAC()
public PasswordBasedMAC(byte[] password)
throws AlgorithmIdentifierException
public PasswordBasedMAC(AlgorithmIdentifier algID,
byte[] password)
throws AlgorithmIdentifierException
public PasswordBasedMAC(AlgorithmIdentifier algID,
byte[] password,
RandomBitsSource rbs)
throws AlgorithmIdentifierException
algID does not contain parameters -- the RandomBitsSource will be used to generate the salt bytes.| Method Detail |
public void setAlgID(AlgorithmIdentifier algID)
throws AlgorithmIdentifierException
setAlgID in class MessageDigestAlgorithmIdentifierExceptionpublic AlgorithmIdentifier getAlgID()
PasswordBasedMAC. If all of the paramter fields (salt, one way function algorithm, iteration count and MAC algorithm) are defined (or defaults can be used), then a new PBMacAlgID containing the parameters is returned; otherwise a PBMacAlgID with no paramters is returned.getAlgID in class MessageDigestpublic void setSalt(byte[] salt)
public byte[] getSalt()
public void setOwfAlgID(AlgorithmIdentifier owfAlgID)
throws AlgorithmIdentifierException
AlgorithmIdentifierExceptionpublic AlgorithmIdentifier getOwfAlgID()
public void setCount(int count)
public int getCount()
public void setMacAlgID(AlgorithmIdentifier macAlgID)
throws AlgorithmIdentifierException
AlgorithmIdentifierExceptionpublic AlgorithmIdentifier getMacAlgID()
public void setRandomBitsSource(RandomBitsSource rbs)
public void setPassword(byte[] password)
public void init()
MessageDigestinit in class MessageDigestpublic int blockSize()
blockSize in class MessageDigestpublic void update(byte b)
MessageDigestupdate in class MessageDigest
public void update(byte[] input,
int off,
int len)
MessageDigestupdate in class MessageDigestinput - the input arrayoff - start position in the input arraylen - the number of input array elements to add to the data being digestedpublic void computeCurrent()
MessageDigestMessageDigest.getDigestBits().computeCurrent in class MessageDigestpublic java.lang.String algName()
MessageDigestalgName in class MessageDigestpublic int getDigestLength()
MessageDigestgetDigestLength in class MessageDigestpublic java.lang.Object clone()
MessageDigestclone in class MessageDigestprotected MessageDigest.MDState getState()
getState in class MessageDigestprotected void setState(MessageDigest.MDState state)
setState in class MessageDigest
|
Oracle Security Developer Tools Crypto Java API Reference 10g Release 3 (10.1.3) B25378-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||