|
Oracle Security Developer Tools Crypto Java API Reference 10g Release 2 (10.1.2.0.2) B15565-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_COUNT Default password-based key derivation iteration count. |
static AlgorithmIdentifier |
DEFAULT_MAC Default password-based MAC algorithm is HMAC-SHA. |
static AlgorithmIdentifier |
DEFAULT_OWF Default password-based key derivation hash function is SHA-1. |
static int |
DEFAULT_SALT_LEN Default 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 MessageDigest
AlgorithmIdentifierException
public 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 MessageDigest
public void setSalt(byte[] salt)
public byte[] getSalt()
public void setOwfAlgID(AlgorithmIdentifier owfAlgID) throws AlgorithmIdentifierException
AlgorithmIdentifierException
public AlgorithmIdentifier getOwfAlgID()
public void setCount(int count)
public int getCount()
public void setMacAlgID(AlgorithmIdentifier macAlgID) throws AlgorithmIdentifierException
AlgorithmIdentifierException
public AlgorithmIdentifier getMacAlgID()
public void setRandomBitsSource(RandomBitsSource rbs)
public void setPassword(byte[] password)
public void init()
MessageDigest
init
in class MessageDigest
public int blockSize()
blockSize
in class MessageDigest
public void update(byte b)
MessageDigest
update
in class MessageDigest
public void update(byte[] input, int off, int len)
MessageDigest
update
in class MessageDigest
input
- the input arrayoff
- start position in the input arraylen
- the number of input array elements to add to the data being digestedpublic void computeCurrent()
MessageDigest
MessageDigest.getDigestBits()
.computeCurrent
in class MessageDigest
public java.lang.String algName()
MessageDigest
algName
in class MessageDigest
public int getDigestLength()
MessageDigest
getDigestLength
in class MessageDigest
public java.lang.Object clone()
MessageDigest
clone
in class MessageDigest
protected MessageDigest.MDState getState()
getState
in class MessageDigest
protected void setState(MessageDigest.MDState state)
setState
in class MessageDigest
|
Oracle Security Developer Tools Crypto Java API Reference 10g Release 2 (10.1.2.0.2) B15565-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |