We use oracle built in function - outln_edit_pkg.generate_signature - to generate 32 byte hash signature for up to a 32k-1 sized string value passed to it.
Reference:
- http://psoug.org/reference/outln_edit_pkg.html
- http://www.dba-oracle.com/oracle_tips_ault_hash_data_warehouse.htm
Wondering what would be the replacement when we move to Postgres. I found below https://www.postgresql.org/docs/current/static/pgcrypto.html documentation related to hashing but not sure which one to use.
Looks like md5 hashing with 32 bit is one option - Hashing a String to a Numeric Value in PostgresSQL - but not 100% sure