# static class smartJ$CryptoHash
{ } .

CLASS :: Smart CryptoHash (ES6, Strict Mode)
Crypto Hash for JavaScript: CRC32B :: (Hex / B36) ; MD5 / SHA1 / SHA224 / SHA256 / SHA384 / SHA512 / SHA3-224 / SHA3-256 / SHA3-384 / SHA3-512 / HMAC :: (Hex / B64) ; PBKDF2 :: (Hex / B92)

- Language: Javascript
- Located at: lib/js/framework/smart-framework.pak.js; crypt_utils.js
- Package: Sf.Javascript:Crypto
- Class Name: smartJ$CryptoHash
- Frozen: Yes
- Version: 20241216
- Usage: smartJ$CryptoHash.method();
- Throws: console.error
- Depends: smartJ$Utils, smartJ$BaseConv

## class Methods

public static function crc32b ( {String} s, {Boolean} b36 ) {} . {String}
@throws: console.error
@return: {String} The CRC32B hash of the string (Hex or B36)
@param: {String} s The string
@param: {Boolean} b36 If set to TRUE will use Base36 Encoding instead of Hex Encoding
Returns the CRC32B hash of a string
public static function sh3a512 ( {String} str, {Boolean} b64 ) {} . {String}
@throws: console.error
@return: {String} The SHA3-512 hash of the string (Hex or B64)
@param: {String} str The string
@param: {Boolean} b64 If set to TRUE will use Base64 Encoding instead of Hex Encoding
Returns the SHA3-512 hash of a string
public static function sh3a384 ( {String} str, {Boolean} b64 ) {} . {String}
@throws: console.error
@return: {String} The SHA3-384 hash of the string (Hex or B64)
@param: {String} str The string
@param: {Boolean} b64 If set to TRUE will use Base64 Encoding instead of Hex Encoding
Returns the SHA3-384 hash of a string
public static function sh3a256 ( {String} str, {Boolean} b64 ) {} . {String}
@throws: console.error
@return: {String} The SHA3-256 hash of the string (Hex or B64)
@param: {String} str The string
@param: {Boolean} b64 If set to TRUE will use Base64 Encoding instead of Hex Encoding
Returns the SHA3-256 hash of a string
public static function sh3a224 ( {String} str, {Boolean} b64 ) {} . {String}
@throws: console.error
@return: {String} The SHA3-224 hash of the string (Hex or B64)
@param: {String} str The string
@param: {Boolean} b64 If set to TRUE will use Base64 Encoding instead of Hex Encoding
Returns the SHA3-224 hash of a string
public static function sha512 ( {String} str, {Boolean} b64 ) {} . {String}
@throws: console.error
@return: {String} The SHA512 hash of the string (Hex or B64)
@param: {String} str The string
@param: {Boolean} b64 If set to TRUE will use Base64 Encoding instead of Hex Encoding
Returns the SHA512 hash of a string
public static function sha384 ( {String} str, {Boolean} b64 ) {} . {String}
@throws: console.error
@return: {String} The SHA384 hash of the string (Hex or B64)
@param: {String} str The string
@param: {Boolean} b64 If set to TRUE will use Base64 Encoding instead of Hex Encoding
Returns the SHA384 hash of a string
public static function sha256 ( {String} str, {Boolean} b64 ) {} . {String}
@throws: console.error
@return: {String} The SHA256 hash of the string (Hex or B64)
@param: {String} str The string
@param: {Boolean} b64 If set to TRUE will use Base64 Encoding instead of Hex Encoding
Returns the SHA256 hash of a string
public static function sha224 ( {String} str, {Boolean} b64 ) {} . {String}
@throws: console.error
@return: {String} The SHA224 hash of the string (Hex or B64)
@param: {String} str The string
@param: {Boolean} b64 If set to TRUE will use Base64 Encoding instead of Hex Encoding
Returns the SHA224 hash of a string
public static function sha1 ( {String} str, {Boolean} b64 ) {} . {String}
@throws: console.error
@return: {String} The SHA1 hash of the string (Hex or B64)
@param: {String} str The string
@param: {Boolean} b64 If set to TRUE will use Base64 Encoding instead of Hex Encoding
Returns the SHA1 hash of a string
public static function md5 ( {String} str, {Boolean} b64 ) {} . {String}
@throws: console.error
@return: {String} The MD5 hash of the string (Hex or B64)
@param: {String} str The string
@param: {Boolean} b64 If set to TRUE will use Base64 Encoding instead of Hex Encoding
Returns the MD5 hash of a string
public static function hmac ( {Enum} algo, {String} key, {String} str, {Boolean} b64 ) {} . {String}
@throws: console.error
@return: {String} The Hmac Hash of the string, salted by key (Hex or B64)
@param: {Enum} algo The hashing algo: md5, sha1, sha224, sha256, sha384, sha512, sha3-224, sha3-256, sha3-384, sha3-512
@param: {String} key The secret key
@param: {String} str The string to be hashed
@param: {Boolean} b64 If set to TRUE will use Base64 Encoding instead of Hex Encoding
Returns the HMAC hash of a string with support for various algorithms

## class Properties

## class Constants

documentation generated on: 2024-12-16 17:00:46 +0000

Smart.Framework © 2009-2024 unix-world.org