Update Research Note Form
Research Note Topic:
Research Note Description:
The ENCRYPT function returns a value that is the result of encrypting data-string-expression. Generally the password used for encryption is either the password-string-expression value or the encryption password value.
An expression that returns a CHAR or VARCHAR value to be encrypted. The length attribute for the data type of data-string-expression |is limited to 32663
An expression that returns a CHAR or VARCHAR value with at least 6 bytes and no more than 127 bytes (SQLSTATE 428FC). The value represents the password used to encrypt the data-string-expression.
Hint-String-Expression An expression that returns a CHAR or VARCHAR value up to 32 bytes that will help data owners remember passwords (for example, 'Student' as a hint to remember 'Dev'). If a hint value is given, the hint is embedded into the result and can be retrieved using the GETHINT function
This example uses the encryption password value to hold the encryption password.
SET ENCRYPTION PASSWORD = 'Dev54321'; INSERT INTO student(SSN) VALUES ENCRYPT('21');
This example explicitly passes the encryption password. INSERT INTO student(SSN) VALUES ENCRYPT('21,'Dev54321','');
The hint 'Student' is stored to help the user remember the encryption password of 'Dev').
INSERT INTO student(SSN) VALUES ENCRYPT('21','Student','Dev');
Prof. Ashay Dharwadker