Name

ENCRYPT

Synopsis

This program produces encrypted values from input values. The program is overloaded as a function and two procedures, and is further overloaded for different datatypes.

Function Version

Accepts four input parameters and returns the encrypted value as a RAW datatype.

Parameter name

Datatype

Description

src

RAW

Value to be encrypted. This value may be of any length.

typ

BINARY_INTEGER

Combines the encryption algorithm, padding method, and chaining method.

key

RAW

Encryption key.

iv

RAW

Initialization vector. This value is added to the input value to reduce the repetition of encrypted values. This parameter must be specified if it was used during encryption, and it must be the same value used for encryption.

Procedure—Version 1

Encrypts LOBs. To encrypt non-LOB values, use the function version of ENCRYPT. This version accepts four input parameters and returns the encrypted value as a RAW datatype.

Parameter name

Datatype

Description

dst

BLOB

OUT parameter; the encrypted value is passed back to the user in this parameter.

src

BLOB

BLOB value or resource locator to be encrypted.

typ

BINARY_INTEGER

Combines the encryption algorithm, padding method, and chaining method.

key

RAW

Encryption key.

iv

RAW

Initialization vector. This value is added to the input value to reduce the repetition of encrypted values. It is optional.

Procedure—Version 2

Identical to the first procedure version, except that it is used to encrypt CLOB data.

Parameter name ...

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.