string-expression
The value to be hashed. This parameter is case sensitive, even in case-insensitive databases.
algorithm
The algorithm to use for the hash. Possible values include: CRC32, MD5, SHA1, SHA1_FIPS, SHA256, SHA256_FIPS. By default,
the MD5 algorithm is used. ECC encryption and FIPS-certified encryption require a separate license. See SQL Anywhere security option.
Following are the return types, depending on the algorithm used:
CRC32 returns a hexadecimal string. Use the HEXTOINT function to convert the hexadecimal string to a 32-bit integer. See HEXTOINT function [Data type conversion].
The following example creates a table called user_info to store information about the users of an application, including their
user ID and password. One row is also inserted into the table. The password is hashed using the HASH function and the SHA256
algorithm. Storing hashed passwords in this way can be useful if you do not want to store passwords in clear text, yet you
have an external application that needs to compare passwords.