Github user DaveBirdsall commented on a diff in the pull request: https://github.com/apache/incubator-trafodion/pull/837#discussion_r89171545 --- Diff: docs/sql_reference/src/asciidoc/_chapters/sql_functions_and_expressions.adoc --- @@ -6497,6 +6717,46 @@ Start/Date Time/Shipped (EXPR) ``` <<< +[[sha_function]] +== SHA Function + +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. + +[[examples_of_sha]] +=== examples of SHA +``` +>>SELECT SHA1('abc') from dual; + +(EXPR) +----------------------------------------- +'a9993e364706816aba3e25717850c26c9cd0d89d' +``` + +<<< +[[sha2_function]] +== SHA2 Function + +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). --- End diff -- In the code review on the SHA-2 functions, I asked whether 0 was needed. If the author of those changes decides that it is not, then this would have to change also.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---