ActionScript 3 Cryptography Library | All Packages | All Classes | Index | Frames No Frames |
HMAC

Package | com.hurlant.crypto.hash
Class | public class HMAC
Inheritance | HMAC Object
Implements | IHMAC

Public Methods

| Method | Defined By
--- | --- | ---
|  | HMAC(hash:IHash, bits:uint = 0) Create a HMAC object, using a Hash function, and optionally a number of bits to return. | HMAC
|  | compute(key:ByteArray, data:ByteArray):ByteArray Compute a HMAC using a key and some data. | HMAC
|  | dispose():void | HMAC
|  | getHashSize():uint | HMAC
|  | toString():String | HMAC

Constructor Detail

HMAC | () | Constructor

`public function HMAC(hash:IHash, bits:uint = 0)`

Create a HMAC object, using a Hash function, and optionally a number of bits to return. The HMAC will be truncated to that size if needed.

Parameters

| `hash:IHash`
| `bits:uint` (default = `0`)``

Method Detail

compute | () | method

`public function compute(key:ByteArray, data:ByteArray):ByteArray`

Compute a HMAC using a key and some data. It doesn't modify either, and returns a new ByteArray with the HMAC value.

Parameters

| `key:ByteArray`
| `data:ByteArray`

Returns

| `ByteArray`

dispose | () | method |

`public function dispose():void`

getHashSize | () | method |

`public function getHashSize():uint`

Returns

| `uint`

toString | () | method |

`public function toString():String`

Returns

| `String`

Mon May 20 2013, 09:16 PM +02:00