-
Notifications
You must be signed in to change notification settings - Fork 11
Home
- CryptoApi
-
Main class
- BaseHasher
-
BaseMac ⇐
BaseHasher
- BaseEncode
-
Encode HashArray
- Hashers
-
Collection of hashers
- Encodes
-
Collection of encodes
- Macs
-
Collection of macs
- Tools
-
Helper with some methods
- HashArray
-
Array of hash bytes
-
Hex ⇐
BaseEncode
-
Hex encode
-
Md2 ⇐
BaseHasher
-
Md2 hasher
-
Md4 ⇐
BaseHasher
-
Md4 hasher
-
Md5 ⇐
BaseHasher
-
Md5 hasher
-
Sha0 ⇐
BaseHasher
-
Sha0 hasher
-
Sha1 ⇐
BaseHasher
-
Sha1 hasher
-
Sha256 ⇐
BaseHasher
-
Sha256 hasher
-
Hmac ⇐
BaseMac
-
HMAC
-
HasherInterface
- instance
- static
Kind: instance class of HasherInterface
Process ready block
Kind: static method of HasherInterface
Param | Type |
---|---|
block | Array.<number> |
HasherInterface.update(message) ⇒ HasherInterface
Update message
Kind: static method of HasherInterface
Param | Type |
---|---|
message |
string | Array.<number>
|
HasherInterface.finalize() ⇒ HashArray
Process last block and return hash
Kind: static method of HasherInterface
Returns: HashArray
- hash
Kind: global interface
Access: public
Kind: instance class of MacInterface
Param | Type |
---|---|
key |
string | Array.<number>
|
hasher | string |
options | Object |
Process ready block
Kind: static method of MacInterface
Param | Type |
---|---|
block | Array.<number> |
MacInterface.update(message) ⇒ MacInterface
Update message
Kind: static method of MacInterface
Param | Type |
---|---|
message |
string | Array.<number>
|
MacInterface.finalize() ⇒ HashArray
Process last block and return hash
Kind: static method of MacInterface
Returns: HashArray
- hash
Kind: global interface
Access: public
-
EncodeInterface
- instance
-
static
-
.stringify() ⇒
string
-
.stringify() ⇒
Kind: instance class of EncodeInterface
Param | Type |
---|---|
hash | HashArray |
Stringify hash
Kind: static method of EncodeInterface
Main class
Kind: global class
Access: public
CryptoApi.BaseHasher : BaseHasher
Kind: static property of CryptoApi
CryptoApi.BaseMac : BaseMac
Kind: static property of CryptoApi
CryptoApi.BaseEncode : BaseEncode
Kind: static property of CryptoApi
CryptoApi.hash(algo, message, options) ⇒ HashArray
Hash message with algo
Kind: static method of CryptoApi
Returns: HashArray
- hash
Access: public
Param | Type |
---|---|
algo | string |
message | string |
options | Object |
CryptoApi.hasher(algo, options) ⇒ HasherInterface
Get new Hasher object
Kind: static method of CryptoApi
Access: public
Param | Type |
---|---|
algo | string |
options | Object |
CryptoApi.mac(algo, key, hasher, options) ⇒ MacInterface
Get new MAC object
Kind: static method of CryptoApi
Access: public
Param | Type |
---|---|
algo | string |
key |
string | Array.<number>
|
hasher | string |
options | Object |
CryptoApi.hashArray(hash) ⇒ HashArray
Get new HashArray
Kind: static method of CryptoApi
Access: public
Param | Type |
---|---|
hash | Array.<number> |
Kind: global class
Access: public
-
BaseHasher
- new BaseHasher(name, options)
-
instance
-
.state.message :
Array.<number>
-
.state.length :
number
-
.state.options :
Object
-
.state.message :
-
static
-
.unitSize :
number
-
.unitOrder :
number
-
.blockSize :
number
-
.getState() ⇒
Object
-
.setState(state) ⇒
BaseHasher
-
.update(message) ⇒
BaseHasher
- .process()
-
.unitSize :
Param | Type |
---|---|
name | string |
options | Object |
Unprocessed Message
Kind: instance property of BaseHasher
Length of message
Kind: instance property of BaseHasher
Kind: instance property of BaseHasher
Size of unit in bytes (4 = 32 bits)
Kind: static property of BaseHasher
Bytes order in unit 0 - normal 1 - reverse
Kind: static property of BaseHasher
Size of block in units
Kind: static property of BaseHasher
Return current state
Kind: static method of BaseHasher
BaseHasher.setState(state) ⇒ BaseHasher
Set state
Kind: static method of BaseHasher
Param | Type |
---|---|
state | Object |
BaseHasher.update(message) ⇒ BaseHasher
Update message
Kind: static method of BaseHasher
Param | Type |
---|---|
message |
string | Array.<number>
|
Process ready blocks
Kind: static method of BaseHasher
BaseMac ⇐ BaseHasher
Kind: global class
Extends: BaseHasher
Access: public
-
BaseMac ⇐
BaseHasher
- new BaseMac(key, hasher, options)
-
.state.message :
Array.<number>
-
.state.length :
number
-
.state.options :
Object
Param | Type |
---|---|
key |
string | Array.<number>
|
hasher | string |
options | Object |
Unprocessed Message
Kind: instance property of BaseMac
Length of message
Kind: instance property of BaseMac
Kind: instance property of BaseMac
Encode HashArray
Kind: global class
Access: public
Param | Type |
---|---|
hash | HashArray |
Kind: instance class of BaseEncode
Param | Type |
---|---|
hash | HashArray |
constructor.hash : HashArray
Kind: instance property of constructor
Properties
Name |
---|
hash |
Collection of hashers
Kind: global class
Kind: static method of Hashers
Param | Type |
---|---|
name | string |
hasher | HasherInterface |
Hashers.add(name, options) ⇒ HasherInterface
Kind: static method of Hashers
Param | Type |
---|---|
name | string |
options | Object |
Collection of encodes
Kind: global class
Kind: static method of Encodes
Param | Type |
---|---|
name | string |
encode | BaseEncode |
Encodes.get(name, hash) ⇒ BaseEncode
Kind: static method of Encodes
Param | Type |
---|---|
name | string |
hash | HashArray |
Collection of macs
Kind: global class
Kind: static method of Macs
Param | Type |
---|---|
name | string |
mac | BaseMac |
Macs.get(name, key, hasher, options) ⇒ MacInterface
Kind: static method of Macs
Param | Type |
---|---|
name | string |
key |
string | Array.<number>
|
hasher | string |
options | Object |
Helper with some methods
Kind: global class
-
Tools
-
.rotateLeft(x, n) ⇒
number
-
.rotateLeft(x, n) ⇒
number
-
.rotateLeft(x, n) ⇒
Rotate x to n bits left
Kind: static method of Tools
Param | Type |
---|---|
x | number |
n | number |
Rotate x to n bits right
Kind: static method of Tools
Param | Type |
---|---|
x | number |
n | number |
Array of hash bytes
Kind: global class
Access: public
Instanceof: Array
Param | Type |
---|---|
hash | Array.<number> |
Encodes | Encodes |
Hex ⇐ BaseEncode
Hex encode
Kind: global class
Extends: BaseEncode
Implements: EncodeInterface
-
Hex ⇐
BaseEncode
- new Hex(hash)
- instance
-
static
-
.stringify() ⇒
string
-
.stringify() ⇒
Param | Type |
---|---|
hash | HashArray |
Kind: instance class of Hex
Implements: constructor
Param | Type |
---|---|
hash | HashArray |
Kind: static method of Hex
Md2 ⇐ BaseHasher
Md2 hasher
Kind: global class
Extends: BaseHasher
Implements: HasherInterface
-
Md2 ⇐
BaseHasher
- new Hmac#constructor(key, hasher, options)
-
instance
- .constructor
-
.piSubst :
Array.<number>
-
.unitSize :
number
-
.hasher :
HasherInterface
-
.key :
Array.<number>
-
.state.message :
Array.<number>
-
.state.length :
number
-
.state.options :
Object
- static
Param | Type |
---|---|
key |
string | Array.<number>
|
hasher | string |
options | Object |
Kind: instance class of Md2
Implements: constructor
Constants from Pi
Kind: instance property of Md2
Link: https://github.com/e-sushi/MD2-S-box-creator
Size of unit = 1 byte
Kind: instance property of Md2
md2.hasher : HasherInterface
Hasher instance
Kind: instance property of Md2
Properties
Name |
---|
hasher |
Kind: instance property of Md2
Properties
Name |
---|
key |
Unprocessed Message
Kind: instance property of Md2
Length of message
Kind: instance property of Md2
Kind: instance property of Md2
Kind: static method of Md2
Param | Type |
---|---|
block | Array.<number> |
Md2.finalize() ⇒ HashArray
Kind: static method of Md2
Md4 ⇐ BaseHasher
Md4 hasher
Kind: global class
Extends: BaseHasher
Implements: HasherInterface
-
Md4 ⇐
BaseHasher
-
instance
- .constructor
-
.state.message :
Array.<number>
-
.state.length :
number
-
.state.options :
Object
-
static
-
.S :
Array.<number>
-
.S :
-
instance
Kind: instance class of Md4
Implements: constructor
Unprocessed Message
Kind: instance property of Md4
Length of message
Kind: instance property of Md4
Kind: instance property of Md4
Transform constants
Kind: static constant of Md4
Md5 ⇐ BaseHasher
Md5 hasher
Kind: global class
Extends: BaseHasher
Implements: HasherInterface
-
Md5 ⇐
BaseHasher
- .constructor
-
.state.message :
Array.<number>
-
.state.length :
number
-
.state.options :
Object
Kind: instance class of Md5
Implements: constructor
Unprocessed Message
Kind: instance property of Md5
Length of message
Kind: instance property of Md5
Kind: instance property of Md5
Sha0 ⇐ BaseHasher
Sha0 hasher
Kind: global class
Extends: BaseHasher
Implements: HasherInterface
-
Sha0 ⇐
BaseHasher
- .constructor
-
.state.message :
Array.<number>
-
.state.length :
number
-
.state.options :
Object
Kind: instance class of Sha0
Implements: constructor
Unprocessed Message
Kind: instance property of Sha0
Length of message
Kind: instance property of Sha0
Kind: instance property of Sha0
Sha1 ⇐ BaseHasher
Sha1 hasher
Kind: global class
Extends: BaseHasher
Implements: HasherInterface
-
Sha1 ⇐
BaseHasher
- .constructor
-
.state.message :
Array.<number>
-
.state.length :
number
-
.state.options :
Object
Kind: instance class of Sha1
Implements: constructor
Unprocessed Message
Kind: instance property of Sha1
Length of message
Kind: instance property of Sha1
Kind: instance property of Sha1
Sha256 ⇐ BaseHasher
Sha256 hasher
Kind: global class
Extends: BaseHasher
Implements: HasherInterface
-
Sha256 ⇐
BaseHasher
- new Sha256(name, options)
- .constructor
-
.state.message :
Array.<number>
-
.state.length :
number
-
.state.options :
Object
Param | Type |
---|---|
name | string |
options | Object |
Kind: instance class of Sha256
Implements: constructor
Param | Type |
---|---|
name | string |
options | Object |
Unprocessed Message
Kind: instance property of Sha256
Length of message
Kind: instance property of Sha256
Kind: instance property of Sha256
Hmac ⇐ BaseMac
HMAC
Kind: global class
Extends: BaseMac
Implements: MacInterface
-
Hmac ⇐
BaseMac
-
instance
-
.state.message :
Array.<number>
-
.state.length :
number
-
.state.options :
Object
-
.state.message :
- static
-
instance
Unprocessed Message
Kind: instance property of Hmac
Length of message
Kind: instance property of Hmac
Kind: instance property of Hmac
Hmac.update(message) ⇒ BaseHasher
Update message
Kind: static method of Hmac
Param | Type |
---|---|
message |
string | Array.<number>
|
Kind: static method of Hmac
Param | Type |
---|---|
block | Array.<number> |
Hmac.finalize() ⇒ HashArray
Kind: static method of Hmac