Jaxer.Util.Crypto

The namespace that holds functions for Cryptographic hashing.

Constructor

Jaxer.Util.Crypto holds the namespace for interacting with crypto and hashing. No instance is required, as all of the methods for the current request take place through a given static object.

Note : There is no reason for this module to be located inside Util. In future releases, it will likely be moved to Jaxer.Crypto.

Methods

  • Jaxer.Util.Crypto.MD2(content);
    • <String> content - The content used to generate the hask key

    <String> - A string containing the MD2 hash key for the provided content

    enerate an MD2 Hash key for the provided content. Message Digest Algorithm 2 (MD2) is a cryptographic hash function developed by Ronald Rivest in 1989. The algorithm is optimized for 8-bit computers. MD2 is specified in RFC 1319. Although other algorithms have been proposed since, such as MD4, MD5 and SHA, even as of 2004 [ update ] MD2 remains in use in public key infrastructures as part of certificates generated with MD2 and RSA.

  • Jaxer.Util.Crypto.MD5(content);
    • <String> content - The content used to generate the hask key

    <String> - A string containing the MD5 hash key for the provided content

    Generate an MD5 Hash key for the provided content. In cryptography, MD5 (Message-Digest algorithm 5) is a widely used cryptographic hash function with a 128-bit hash value. As an Internet standard (RFC 1321), MD5 has been employed in a wide variety of security applications, and is also commonly used to check the integrity of files. However, it is now known to be partially insecure thus reducing its suitability for these purposes. An MD5 hash is typically expressed as a 32 digit hexadecimal number. MD5 was designed by Ron Rivest in 1991 to replace an earlier hash function, MD4. In 1996, a flaw was found with the design of MD5. While it was not a clearly fatal weakness, cryptographers began recommending the use of other algorithms, such as SHA-1 (which has since been found vulnerable itself). In 2004, more serious flaws were discovered making further use of the algorithm for security purposes questionable. In 2007 a group of researchers including Arjen Lenstra described how to create a pair of files that share the same MD5 checksum. In an attack on MD5 published in December 2008, a group of researchers used this technique to fake SSL certificate validity.

  • Jaxer.Util.Crypto.SHA1(content);
    • <String> content - The content used to generate the hask key

    <String> - A string containing the SHA1 hash key for the provided content

    Generate an SHA1 Hash key for the provided content. The SHA hash functions are a set of cryptographic hash functions designed by the National Security Agency (NSA) and published by the NIST as a U.S. Federal Information Processing Standard. SHA stands for Secure Hash Algorithm.

  • Jaxer.Util.Crypto.SHA2(content);
    • <String> content - The content used to generate the hask key

    <String> - A string containing the SHA2 hash key for the provided content

    Generate an SHA256 Hash key for the provided content. SHA-256 is novel hash function computed with a 32-bit word.

  • Jaxer.Util.Crypto.SHA384(content);
    • <String> content - The content used to generate the hask key

    <String> - A string containing the SHA384 hash key for the provided content

    Generate an SHA384 Hash key for the provided content. SHA-384 is simply a truncated version of the SHA512, computed with different initial values.

  • Jaxer.Util.Crypto.SHA512(content);
    • <String> content - The content used to generate the hask key

    <String> - A string containing the SHA512 hash key for the provided content

    Generate an SHA512 Hash key for the provided content. SHA-512 is novel hash function computed with a 64-bit word.

  • Jaxer.Util.Crypto.verifyMD2(content, hash);
    • <String> content - The content used to Verify the hask key
    • <String> content - The hash value to compare

    <Boolean> true if the hash matches, false if not

    Verify an MD2 Hash key for the provided content.

  • Jaxer.Util.Crypto.verifyMD5(content, hash);
    • <String> content - The content used to Verify the hask key
    • <String> content - The hash value to compare

    <Boolean> true if the hash matches, false if not

    Verify an MD5 Hash key for the provided content.

  • Jaxer.Util.Crypto.verifySHA1(content, hash);
    • <String> content - The content used to Verify the hask key
    • <String> content - The hash value to compare

    <Boolean> true if the hash matches, false if not

    Verify an SHA1 Hash key for the provided content.

  • Jaxer.Util.Crypto.verifySHA256(content, hash);
    • <String> content - The content used to Verify the hask key
    • <String> content - The hash value to compare

    <Boolean> true if the hash matches, false if not

    Verify an SHA256 Hash key for the provided content.

  • Jaxer.Util.Crypto.verifySHA384(content, hash);
    • <String> content - The content used to Verify the hask key
    • <String> content - The hash value to compare

    <Boolean> true if the hash matches, false if not

    Verify an SHA384 Hash key for the provided content.

  • Jaxer.Util.Crypto.verifySHA512(content, hash);
    • <String> content - The content used to Verify the hask key
    • <String> content - The hash value to compare

    <Boolean> true if the hash matches, false if not

    Verify an SHA512 Hash key for the provided content.