Hi,

I have an account in A2Hosting.com, and I'm developing some functions that
deal with encryption.

A2Hosting.com don't have available the function "digest()"

[code]
ERROR:  function digest(unknown, unknown) does not exist
LINE 1: select digest('ffff', 'sha1')
               ^
HINT:  No function matches the given name and argument types. You might need
to add explicit type casts.

Indicação de entrada :
select digest('ffff', 'sha1')
[/code]

I need to compile a SHA1 function, but without the digest() function,
nothing done...

[code]
    CREATE OR REPLACE FUNCTION sha1(bytea) returns text AS $$
      SELECT encode(digest($1, 'sha1'), 'hex')
    $$ LANGUAGE SQL STRICT IMMUTABLE;
[/code]

There is a way to get this job done without the digest() function?

I need also to be able to do this select "select substr(gen_salt('md5'), 0,
10)" but there is no "gen_salt()" available...


What is my best option? To change hosting account? There is some hosting
accounts with this functions available in the Postgre?



Best Regards,

Reply via email to