db=# SELECT digest('test', 'sha256'); ERROR: Cannot use "sha256": No such hash algorithm
I have standard Fedora Core 4 installed with standard PostgreSQL 8.1.3 Pgcrypto documentation says that it has built-in SHA256 and it should work when OpenSSL is not found:
============== Without OpenSSL, public-key encryption does not work, as pgcrypto does not yet contain math functions for large integers.
Fedora core has OpenSSL 0.9.7 installed by default. And it's not possible to install 0.9.8 because of glibc conflict.
I suspect pgcrypto looks for SHA256 in OpeSSL lib when it should use built-in. SHA256 is working fine on Windows but on Redhat it fails. Maybe because windows pgcrypto DLL is compiled statically with OpenSSL?