|
Oracle Security Developer Tools Crypto Java API Reference 11g (11.1.1) E10668-02 |
||||||||
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.MAC
public abstract class MAC
An abstract class for Message Authentication Code.
HMAC
Nested Class Summary |
---|
Nested classes/interfaces inherited from class oracle.security.crypto.core.MessageDigest |
---|
MessageDigest.MDState |
Field Summary |
---|
Fields inherited from class oracle.security.crypto.core.MessageDigest |
---|
algID, digestBits, digestValid |
Constructor Summary | |
---|---|
protected |
MAC() Empty constructor. |
Method Summary | |
---|---|
byte[] |
computeMAC() Computes the MAC based on the data entered with the update() methods. |
byte[] |
computeMAC(byte[] document) Computes the MAC based on the specified parameter. |
abstract void |
erase() Erases the sensitive data. |
static MAC |
getInstance(AlgorithmIdentifier algID, SymmetricKey key) Creates a new initialized MAC instance with the specified parameters. |
abstract void |
initialize(AlgorithmIdentifier algID, SymmetricKey key) Initializes this MAC with the specified parameter. |
boolean |
verifyMAC(byte[] macBytes) Verifies the MAC based on the data entered with the update() methods and the parameter. |
boolean |
verifyMAC(byte[] document, byte[] macBytes) Verifies the MAC based on the specified parameters. |
Methods inherited from class oracle.security.crypto.core.MessageDigest |
---|
algName, blockSize, clone, computeCurrent, computeDigest, computeDigest, getAlgID, getDigestBits, getDigestLength, getInstance, getState, init, isEqual, isValid, setAlgID, setState, toString, update, update, update, 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 |
Constructor Detail |
---|
protected MAC()
Method Detail |
---|
public static MAC getInstance(AlgorithmIdentifier algID, SymmetricKey key) throws AlgorithmIdentifierException
algID
- The MAC algorithm identifier representing the MAC instance to create (can be AlgID.hmacMD5, AlgID.hmacSHA...).key
- The key to use in this MAC. The key bytes will be cloned when initialized.AlgorithmIdentifierException
public abstract void initialize(AlgorithmIdentifier algID, SymmetricKey key) throws AlgorithmIdentifierException
algID
- The MAC algorithm.key
- The key to use in this MAC. The key bytes will be cloned when initialized.AlgorithmIdentifierException
public byte[] computeMAC()
public byte[] computeMAC(byte[] document)
document
- The document to digest to calculate the MAC.public boolean verifyMAC(byte[] macBytes)
macBytes
- The MAC value to compare to the result of the MAC computation.public boolean verifyMAC(byte[] document, byte[] macBytes)
document
- The document to digest to calculate the MAC.macBytes
- The MAC value to compare to the result of the MAC computation.public abstract void erase()
|
Oracle Security Developer Tools Crypto Java API Reference 11g (11.1.1) E10668-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |