sha224()

A function computing a SHA-224 hash

sha224() is a system function for computing the SHA-224 hash of the provided binary string.

sha224() was added in PostgreSQL 11.

Usage

sha224 ( bytea ) → bytea

Change history

Examples

Basic usage example for sha224():

postgres=# SELECT sha224('foo'::bytea);
                           sha224                           
------------------------------------------------------------
 \x0808f64e60d58979fcb676c96ec938270dea42445aeefcd3a4e6f8db
(1 row)

Return the generated hash as a text string:

postgres=# SELECT encode(sha224('foo'::bytea), 'hex');
                          encode                          
----------------------------------------------------------
 0808f64e60d58979fcb676c96ec938270dea42445aeefcd3a4e6f8db
(1 row)

Categories

System function

See also

sha256(), sha384(), sha512(), md5()