Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.6.0
    • Component/s: Table SQL / API
    • Labels:
      None

      Description

      MD5(str)Calculates an MD5 128-bit checksum for the string. The value is returned as a string of 32 hexadecimal digits, or NULL if the argument was NULL. The return value can, for example, be used as a hash key. See the notes at the beginning of this section about storing hash values efficiently.

      The return value is a nonbinary string in the connection character set.

      • Example:
        MD5('testing') - 'ae2b1fca515949e5d54fb22b8ed95575'

      SHA1(str), SHA(str)Calculates an SHA-1 160-bit checksum for the string, as described in RFC 3174 (Secure Hash Algorithm). The value is returned as a string of 40 hexadecimal digits, or NULL if the argument was NULL. One of the possible uses for this function is as a hash key. See the notes at the beginning of this section about storing hash values efficiently. You can also use SHA1() as a cryptographic function for storing passwords. SHA() is synonymous with SHA1().

      The return value is a nonbinary string in the connection character set.

      • Example:
        SHA1('abc') -> 'a9993e364706816aba3e25717850c26c9cd0d89d'

      SHA2(str, hash_length)Calculates the SHA-2 family of hash functions (SHA-224, SHA-256, SHA-384, and SHA-512). The first argument is the cleartext string to be hashed. The second argument indicates the desired bit length of the result, which must have a value of 224, 256, 384, 512, or 0 (which is equivalent to 256). If either argument is NULL or the hash length is not one of the permitted values, the return value is NULL. Otherwise, the function result is a hash value containing the desired number of bits. See the notes at the beginning of this section about storing hash values efficiently.

      The return value is a nonbinary string in the connection character set.

      • Example:
        SHA2('abc', 224) -> '23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7'
      • See more:

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                micg Michael Gendelman
                Reporter:
                sunjincheng121 sunjincheng
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: