Class Index | File Index

Classes


Class KJUR.crypto.Mac

Mac class which is very similar to java.security.Mac class
Defined in: crypto-1.1.js.

Class Summary
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:
  • hmacmd5 - cryptojs
  • hmacsha1 - cryptojs
  • hmacsha224 - cryptojs
  • hmacsha256 - cryptojs
  • hmacsha384 - cryptojs
  • hmacsha512 - cryptojs
NOTE: HmacSHA224 and HmacSHA384 issue was fixed since jsrsasign 4.1.4.
Method Summary
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:
  • hmacmd5 - cryptojs
  • hmacsha1 - cryptojs
  • hmacsha224 - cryptojs
  • hmacsha256 - cryptojs
  • hmacsha384 - cryptojs
  • hmacsha512 - cryptojs
NOTE: HmacSHA224 and HmacSHA384 issue was fixed since jsrsasign 4.1.4. Please use 'ext/cryptojs-312-core-fix*.js' instead of 'core.js' of original CryptoJS to avoid those issue.
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

© 2012 Kenji Urushima, All rights reserved
Documentation generated by JsDoc Toolkit 2.4.0