shacrypt
Implements SHA256-CRYPT and SHA512-CRYPT password encryption schemes
Repository
dverite/postgres-shacrypt
https://github.com/dverite/postgres-shacrypt
Source
postgres_shacrypt-1.1.tar.gz
postgres_shacrypt-1.1.tar.gz
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
shacrypt | 1.1 | UTIL | PostgreSQL | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 4440 | shacrypt | No | Yes | No | Yes | No | Yes | - |
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.1 | 1817161514 | shacrypt | - |
| RPM | PIGSTY | 1.1 | 1817161514 | shacrypt_$v | - |
| DEB | PIGSTY | 1.1 | 1817161514 | postgresql-$v-shacrypt | - |
Build
You can build the RPM / DEB packages for shacrypt using pig build:
Install
You can install shacrypt directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Install
pig
dnf
apt
Create Extension:
Usage
Generate SHA256-CRYPT and SHA512-CRYPT password hashes per the SHA-crypt specification.
Functions
sha256_crypt(key text, salt text) RETURNS text
With custom rounds:
sha512_crypt(key text, salt text) RETURNS text
Salt Format
- Simple salt:
'somesalt' - With algorithm prefix:
'$5$somesalt'(SHA-256) or'$6$somesalt'(SHA-512) - With custom rounds:
'$5$rounds=10000$somesalt'
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)