Name

HASH

Synopsis

This program generates cryptographic hash values from the input values. You can generate Message Digest (MD) or Secure Hash Algorithm 1 (SHA-1) hash values by specifying the appropriate typ parameter. This program is overloaded with three functions

Function—Version 1

Generates hash values of non-LOB datatypes. This version accepts two parameters and returns the hash value as a RAW datatype.

Parameter name

Datatype

Description

src

RAW

Input value whose hash value is to be generated

typ

BINARY_INTEGER

Hash algorithm to be used: DBMS_CRYPTO.HASH_MD5 for MD5 or DBMS_CRYPTO.HASH_SH1 for SHA-1

Function—Version 2

Generates hash values of BLOB datatypes. This version accepts two parameters and returns the hash value as a RAW datatype.

Parameter name

Datatype

Description

src

BLOB

Input BLOB value or resource locator whose hash value is to be generated

typ

BINARY_INTEGER

Hash algorithm to be used: DBMS_CRYPTO.HASH_MD5 for MD5 or DBMS_CRYPTO.HASH_SH1 for SHA-1

Function—Version 3

Generates hash values of CLOB datatypes. This version accepts two parameters and returns the hash value as a RAW datatype.

Parameter name

Datatype

Description

src

CLOB

Input CLOB value or resource locator whose hash value is to be generated

typ

BINARY_INTEGER

Hash algorithm to be used: DBMS_CRYPTO.HASH_MD4 for MD4, DBMS_CRYPTO.HASH_MD5 for MD5, or DBMS_CRYPTO.HASH_SH1 for SHA-1

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.