shacrypt
Implements SHA256-CRYPT and SHA512-CRYPT password encryption schemes
shacrypt : Implements SHA256-CRYPT and SHA512-CRYPT password encryption schemes
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 4440 | shacrypt | shacrypt | 1.1 |
UTIL | PostgreSQL | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-r | No | Yes | No | Yes | yes | no |
| Relationships | |
|---|---|
| See Also | pgsodium pgcrypto pguecc cryptint pgcryptokey pgsmcrypto hashlib xxhash md5hash hashtypes |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.1 |
18 17 16 15 14 | shacrypt |
- |
| RPM | PIGSTY | 1.1 |
18 17 16 15 14 | shacrypt_$v |
- |
| DEB | PIGSTY | 1.1 |
18 17 16 15 14 | postgresql-$v-shacrypt |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 |
| el8.aarch64 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 |
| el9.x86_64 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 |
| el9.aarch64 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 |
| el10.x86_64 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 |
| el10.aarch64 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 |
| d12.x86_64 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 |
| d12.aarch64 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 |
| d13.x86_64 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 |
| d13.aarch64 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 |
| u22.x86_64 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 |
| u22.aarch64 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 |
| u24.x86_64 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 |
| u24.aarch64 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 |
| u26.x86_64 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 |
| u26.aarch64 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 | PIGSTY 1.1 |
Source
github.com/dverite/postgres-shacrypt
postgres_shacrypt-1.1.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Create this extension with:
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'