Class KJUR.crypto.Mac
Mac class which is very similar to java.security.Mac class
Defined in: crypto-1.1.js.
Constructor Attributes | Constructor Name and Description |
---|---|
KJUR.crypto.Mac(params)
Mac(Message Authentication Code) class which is very similar to java.security.Mac class
Currently this supports following algorithm and providers combination:
|
Method Attributes | Method Name and Description |
---|---|
<static> |
KJUR.crypto.Mac.doFinal()
completes hash calculation and returns hash result
|
<static> |
KJUR.crypto.Mac.doFinalHex(hex)
performs final update on the digest using hexadecimal string,
then completes the digest computation
|
<static> |
KJUR.crypto.Mac.doFinalString(str)
performs final update on the digest using string, then completes the digest computation
|
<static> |
KJUR.crypto.Mac.updateHex(hex)
update digest by specified hexadecimal string
|
<static> |
KJUR.crypto.Mac.updateString(str)
update digest by specified string
|
Class Detail
KJUR.crypto.Mac(params)
Mac(Message Authentication Code) class which is very similar to java.security.Mac class
Currently this supports following algorithm and providers combination:
Currently this supports following algorithm and providers combination:
- hmacmd5 - cryptojs
- hmacsha1 - cryptojs
- hmacsha224 - cryptojs
- hmacsha256 - cryptojs
- hmacsha384 - cryptojs
- hmacsha512 - cryptojs
var mac = new KJUR.crypto.Mac({alg: "HmacSHA1", prov: "cryptojs", "pass": "pass"}); mac.updateString('aaa') var macHex = md.doFinal()
- Parameters:
- {Array} params
- parameters for constructor
Method Detail
<static>
KJUR.crypto.Mac.doFinal()
completes hash calculation and returns hash result
md.digest()
<static>
KJUR.crypto.Mac.doFinalHex(hex)
performs final update on the digest using hexadecimal string,
then completes the digest computation
md.digestHex('0f2abd')
- Parameters:
- {String} hex
- hexadecimal string to final update
<static>
KJUR.crypto.Mac.doFinalString(str)
performs final update on the digest using string, then completes the digest computation
md.digestString('aaa')
- Parameters:
- {String} str
- string to final update
<static>
KJUR.crypto.Mac.updateHex(hex)
update digest by specified hexadecimal string
md.updateHex('0afe36');
- Parameters:
- {String} hex
- hexadecimal string to update
<static>
KJUR.crypto.Mac.updateString(str)
update digest by specified string
md.updateString('New York');
- Parameters:
- {String} str
- string to update