DB2 Scalar functions - GETHINT


Volta a página anterior

Volta ao Menu das scalar functions

Volta ao Menu Principal


Desenvolvido por DORNELLES Carlos Alberto - Analista de Sistemas - Brasília DF. - cad_cobol@hotmail.com

GETHINT

The GETHINT function will return the password hint if one is found in the encrypted-data.

Important:

The GETHINT function is deprecated and might not appear in future releases.

GETHINT(encrypted-data )

The schema is SYSIBM.

A password hint is a phrase that will help data owners remember passwords;
for example, 'Ocean' as a hint to remember 'Pacific'.
In a Unicode database, if a supplied argument is a graphic string, it is first converted to a character string before the function is executed.

encrypted-data
An expression that returns a CHAR FOR BIT DATA or VARCHAR FOR BIT DATA value that is a complete, encrypted data string.
The data string must have been encrypted using the ENCRYPT function (SQLSTATE 428FE).

The result of the function is VARCHAR(32 OCTETS).
The result can be null; if the hint parameter was not added to the encrypted-data by the ENCRYPT function or the first argument is null, the result is the null value.

Example

In this example the hint 'Ocean' is stored to help the user remember the encryption password 'Pacific'.

   INSERT  INTO EMP (SSN) 
   VALUES  ENCRYPT('289-46-8832'
   ,      'Pacific'
   ,      'Ocean');
   SELECT  GETHINT(SSN)
   FROM    EMP;
The value returned is 'Ocean'.

Related reference



© Copyright IBM Corp.