Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8117501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:11:32+00:00 2026-06-06T04:11:32+00:00

DECLARE l_string NVARCHAR2(600) := ‘123456’; checksum NVARCHAR2(600); BEGIN DBMS_OUTPUT.DISABLE; DBMS_OUTPUT.ENABLE(1000000); DBMS_OBFUSCATION_TOOLKIT.md5 (input_string => l_string,

  • 0
DECLARE
  l_string  NVARCHAR2(600) := '123456';
  checksum  NVARCHAR2(600);

BEGIN

   DBMS_OUTPUT.DISABLE;
   DBMS_OUTPUT.ENABLE(1000000);

   DBMS_OBFUSCATION_TOOLKIT.md5 (input_string  => l_string, checksum_string => checksum);

   DBMS_OUTPUT.PUT_LINE(RAWTONHEX(utl_raw.cast_to_raw(checksum)));

END;

Expected value: e10adc3949ba59abbe56e057f20f883e

But it returns: FFFD00390049FFFD0059FFFDFFFD0056FFFD000FFFFD003E

Note I want to maintain nvarchar2 datatype. The value from checksum variable gets stored in column that is of type nvarchar2.

I am aware that md5 accepts and returns data in varchar2. But if someone can help me figure this out using nvarchar2 data type, that would be great.

The NLS_CHARACTERSET = AL32UTF8

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T04:11:33+00:00Added an answer on June 6, 2026 at 4:11 am

    The following should work via dbms_crypto using hash()

    declare
      l_src nvarchar2(100) := '123456';
      l_raw_hash raw(100);
    begin
      l_raw_hash := dbms_crypto.hash(to_clob(l_src), dbms_crypto.HASH_MD5);
      dbms_output.put_line(l_raw_hash);
    end;
    

    Result: E10ADC3949BA59ABBE56E057F20F883E

    l_raw_hash will be in raw format. You can use UTL_RAW to convert it to another datat type. Just make sure your display is showing the proper character set or thing will look interesting.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

declare @d varchar set @d = 'No filter' if (@d like 'No filter') BEGIN
Query DECLARE v_vendor_id NUMBER; BEGIN FOR vp_rec IN ( SELECT * FROM vpprocess )
If I do the following, everything is fine: declare l_foo clob; begin select regexp_replace(
DECLARE @table table(XYZ VARCHAR(8) , id int) INSERT INTO @table SELECT '4000', 1 UNION
Declare: LPWSTR** lines= new LPWSTR*[totalLines]; then i set using: lines[totalLines]=&totalText; SetWindowText(totalChat,(LPWSTR)lines[totalLines]); totalLines++; Now I
declare @servername varchar(2000) set @EmriServerit=(select @@servername) declare @dbname varchar(2000) set @dbname ='Test1' declare @Dir
DECLARE @lastname VARCHAR(25) DECLARE @birthdate VARCHAR(25) SELECT @lastname = 'Smith' SELECT @birthdate = '19-Apr-36'
DECLARE @Symb varchar SET @Symb = 'Lara' SELECT Names FROM Cricket where Names like
declare c int set c = 1 while c<700 do update users set profile_display_name
DECLARE @MinPV MONEY -- PSV DECLARE @MaxPV MONEY -- PSV DECLARE @MinGV MONEY --

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.