mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-28 04:37:22 +02:00
This was from before the hex format was available in bytea. Now we can remove the extra explicit encoding/decoding calls and rely on the default output format. Discussion: https://www.postgresql.org/message-id/flat/17dcb4f7-7ac1-e2b6-d5f7-2dfba06cd9ee%40enterprisedb.com
46 lines
1.2 KiB
Plaintext
46 lines
1.2 KiB
Plaintext
--
|
|
-- MD5 message digest
|
|
--
|
|
SELECT digest('', 'md5');
|
|
digest
|
|
------------------------------------
|
|
\xd41d8cd98f00b204e9800998ecf8427e
|
|
(1 row)
|
|
|
|
SELECT digest('a', 'md5');
|
|
digest
|
|
------------------------------------
|
|
\x0cc175b9c0f1b6a831c399e269772661
|
|
(1 row)
|
|
|
|
SELECT digest('abc', 'md5');
|
|
digest
|
|
------------------------------------
|
|
\x900150983cd24fb0d6963f7d28e17f72
|
|
(1 row)
|
|
|
|
SELECT digest('message digest', 'md5');
|
|
digest
|
|
------------------------------------
|
|
\xf96b697d7cb7938d525a2f31aaf161d0
|
|
(1 row)
|
|
|
|
SELECT digest('abcdefghijklmnopqrstuvwxyz', 'md5');
|
|
digest
|
|
------------------------------------
|
|
\xc3fcd3d76192e4007dfb496cca67e13b
|
|
(1 row)
|
|
|
|
SELECT digest('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789', 'md5');
|
|
digest
|
|
------------------------------------
|
|
\xd174ab98d277d9f5a5611c2c9f419d9f
|
|
(1 row)
|
|
|
|
SELECT digest('12345678901234567890123456789012345678901234567890123456789012345678901234567890', 'md5');
|
|
digest
|
|
------------------------------------
|
|
\x57edf4a22be3c955ac49da2e2107b67a
|
|
(1 row)
|
|
|