January 2019
Beginner
556 pages
14h 19m
English
Two-way encryption is used to store sensitive information, such as payment information. pgcrypto provides two functions—mainly encrypt and decrypt—as shown in the following script:
test=# \df encrypt List of functions Schema | Name | Result data type | Argument data types | Type --------+---------+------------------+---------------------+-------- public | encrypt | bytea | bytea, bytea, text | normal(1 row)test=# \df decrypt List of functions Schema | Name | Result data type | Argument data types | Type --------+---------+------------------+---------------------+-------- public | decrypt | bytea | bytea, bytea, text | normal(1 row)
The encrypt and decrypt functions require three arguments: the data to encrypt, the key, ...
Read now
Unlock full access