Name

DES3GETKEY

Synopsis

This program generates an encryption key that is cryptographically secure. The key can be used with the Triple Data Encryption Standard (DES3) encryption algorithm, both the two-pass and three-pass variants. It is overloaded as a function and a procedure, and is further overloaded for different datatypes.

Procedure—Version 1

Accepts two input parameters and returns the key in the OUT parameter.

Parameter name

Datatype

Description

which

BINARY_INTEGER

Number of passes for Triple DES algorithm: 1 for two-pass, 2 for three-pass. The default is 1 (two-pass).

seed_string

VARCHAR2

Seed string to be used in generating the key.

key

VARCHAR2

The only OUT parameter; the generated key is placed here.

Procedure—Version 2

Identical to the first version in that it also accepts two input parameters and returns the key in the OUT parameter. The difference is that the parameters are RAW.

Parameter name

Datatype

Description

which

BINARY_INTEGER

Number of passes for Triple DES algorithm: 1 for two-pass, 2 for three-pass. The default is 1 (two-pass).

seed

RAW

Seed string to be used in generating the key.

key

RAW

The only OUT parameter; the generated key is placed here.

Function—Version 1

Accepts two input parameters and returns the generated key. Returns the key as a VARCHAR2.

Parameter name

Datatype

Description

which

BINARY_INTEGER

Number of passes for Triple DES algorithm: 1 for two-pass, 2 for three-pass. The default is 1 (two-pass).

seed_string

Get Oracle PL/SQL for DBAs now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.