web analytics

Oracle: checksum function for strings

CREATE OR REPLACE FUNCTION get_checksum(source_string IN VARCHAR)
RETURN VARCHAR IS
  raw_string RAW(2048);
  result     RAW(2048);
BEGIN
  raw_string := utl_i18n.string_to_raw(source_string);
  result := sys.dbms_crypto.hash(raw_string, sys.dbms_crypto.hash_sh1);
  RETURN result ;
END;
/

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

  

  

  

Categories

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.