PasswordDeriveBytes for PL/SQL

How to implement PasswordDeriveBytes (c#) in Oracle PL/SQL? Many examples are in Java or c#.

Kind regards.

You started this thread saying you know many implementations in c# and java. How is possible to convert one of these examples of pl/sql?

If I take the first link I find using https://www.google.com/?gws_rd=ssl#newwindow=1&q=PasswordDeriveBytes+java , http://stackoverflow.com/questions/21480202/encryption-result-in-java-and-net-are-not-same I see a java implementation. And transformed into pl/sql.

  function PasswordDeriveBytes
    ( passPhrase varchar2
    , saltValue raw
    , hashAlgorithm varchar2 := 'SHA1'
    , iterations pls_integer := 100
    , len pls_integer := null
    )
  return raw
  is
    rv raw(1000);
    tmp raw(1000);
    htype pls_integer := case hashAlgorithm
                           when 'MD5'  then dbms_crypto.hash_md5
                           when 'SHA1' then dbms_crypto.hash_sh1
                         end;
  begin
    tmp := dbms_crypto.hash( utl_raw.concat( utl_i18n.string_to_raw( passPhrase )
                                           , saltValue
                                           )
                           , htype
                           );
    for i in 1 .. iterations - 2
    loop
      tmp := dbms_crypto.hash( tmp, htype );
    end loop;
    rv := dbms_crypto.hash( tmp, htype );
    if len is not null
    then
      for i in 1 .. trunc( ( len - 1 ) / utl_raw.length( rv ) )
      loop
        rv := utl_raw.concat( rv, dbms_crypto.hash( utl_raw.concat( utl_raw.cast_to_raw( i ), tmp ), htype ) );
      end loop;
      rv := utl_raw.substr( rv, 1, len );
    end if;
    return rv;
  end;

Two minutes

Tags: Database

Similar Questions

  • Automated for MS SQL Server 2008 R2 Enterprise Tools

    What are some automated tools for MS SQL Server Enterprise 2008 R2 for the integration of large amounts of data, development of logical and physical diagrams and data dictionaries?

    Hello

    Answers is mainly oriented to the individual user and small sized networks without domain or business problems. While TechNet is primarily oriented toward professional users with servers, by area and by business issues:

    TechNet - Windows Server
    http://social.technet.Microsoft.com/forums/en/category/WindowsServer

    LC

  • Hardware requirements for MS SQL Server for about 100 concurrent users

    Can someone suggest the hardware configuration required for MS SQL Server for about 100 concurrent users?

    Microsoft page suggests 2 GHz CPU and 4 GB of RAM, but it does not mention the number of users. Wonder how many users affects the performance of MS SQL.

    Your question of Windows 7 is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for Windows Server on MSDN. Please post your question in the MSDN Windows Server forum.

    http://social.msdn.Microsoft.com/forums/en-us/category/SQLServer/

  • Update of security for the SQL Server 2005 Service Pack 3 (KB970892) constantly moved, what can I do about it?

    Update of security for the SQL Server 2005 Service Pack 3 (KB970892) constantly moved, what can I do about it?

    The update tried to automatically install dozens of times, but it keeps failing, is there something I can fix which will allow this facility. I have reasonable computer skills but I'm not good at that, I need step by step help and a full explanation of acronyms.

    Hi Laurence,.

    The issue of Windows is more complex than what is generally answered in the Microsoft Community Forums. Appropriate in the TechNet Forums. Please post your question in the TechNet Forums.

    You can check the link to post your question:

    http://social.technet.Microsoft.com/forums/en-us/category/SQLServer

    I hope that helps!

  • Error code 64 c for update of security for the SQL Server 2005 Service Pack 3 (KB2494113)

    Have tried to install KB2494113 - update of safety and he constantly fails to install. Help please as I know very little about the "intricacies" of my laptop

    Hi Phillipmuir,

    Step 1:

    You can read the following article and try to reset the Windows Update components and check.

    How to reset the Windows Update components?

    http://support.Microsoft.com/kb/971058

    Step 2:

    You can also check the following link and try to download and install the standalone update package:

    Update of security for the SQL Server 2005 Service Pack 3 (KB2494113)

    Hope this information is useful.

  • Windows Update failed - error 0 x 80070643 for Microsoft SQL Server 2005 Express Edition Service Pack 4 (KB2463332)

    Original title: Windows Update Failed - need help

    Vista 32 Ultimate with all updates, until this one: update Windows failed: error 0 x 80070643 for Microsoft SQL Server 2005 Express Edition Service Pack 4 (KB2463332). Update has failed repeatedly.  I tried to restart, remove the update (even by deleting the file so it would download it again) and install again.  Nothing has worked.  Error 80070643.  Since it is not Office 2003, the error seems to mean a problem with the Windows .NET framework.  Don't know what that means.

    Looking at KB976982, I tried to fix MSI software update registration corruption issues (whatever that means) by running the automated Fix It by KB971187. Restarted, I tried Windows Update again.  Still didn't update.

    Then, I waited two days and tried again.  Even that did not help.

    I tried bypassing Windows Update simply by downloading and then run the file SQLEXPR32.exe from Microsoft downloads. Did not work at all. I then tried to run it as an administrator (even if it was already an administrator account, with no other account on this computer at all).  He started to run and then gave me the following error message: unable to run the SQL Server System Configuration Checker due configulation WMI on the computer.  Error: 70347 (0x112cb).

    Now I'm really confused.  On the one hand, 80070643 means I probably repair the .NET framework, which certainly, I hate to do because I need several versions of the .NET framework first uninstall and then try to install the compmonents, and I'm afraid something would go wrong.

    On the other hand, the 70347 (0x112cb) error message seems to indicate the problem is completely different and has to do with WMI, which probably has to do with permissions and I have no idea how to solve this problem.  (And why it all of a sudden would be any problem with permissions?)  This computer is not on a corporate network and has only one user account, the administrative account).  I have looked at Services and Applications in computer management, where there are WMI control, but nothing shown that I can possibly change and not the SQL Server Configuration Manager under it, which doesn't seem to have much either.

    Help!  Please...

    And now I also tried to fix it, just in case where, the .NET framework (Panel > programs and features > Microsift.NET framework Client profile 4 > uninstall/change > fix it), and the Windows Update tried again (including reboot).  Still no.  Everything I try, it is not to do nothing, pardon my language.  People smarter than me, pleasehelp!

    Hi stupID_,

    «Error 0 x 80070643 for Microsoft SQL Server 2005 Express Edition Service Pack 4 (KB2463332).» Update has failed repeatedly. »

    As the error relates to SQL, perhaps this forum:

    SQL Installation of Server & upgrade
    http://social.msdn.Microsoft.com/forums/en-us/sqlsetupandupgrade/threads/

    TaurArian [MVP] 07/01/2005-30/06/2011. The information has been provided * being * with no guarantee or warranty. What works for some, may not always work for others.

  • Can someone please guide me what combinations encryption algorithm is compatible for MS SQL Windows Server 2012 2012. ??

    Original title: Details of the cipher suites?

    Can someone please guide me what combinations encryption algorithm is compatible for MS SQL Windows Server 2012 2012. ??

    Thank you

    Hello

    Your question is beyond the scope of this community.

    Please repost your question in the SQL Server TechNet Forums.

    https://social.technet.Microsoft.com/forums/SQLServer/en-us/home?category=SQLServer

    TechNet Server forums.

    http://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?category=WindowsServer

    See you soon.

  • Looking for a SQL query to retrieve callvariables + ECC to a RESULTS of SCRIPT EXECUTE (translation VRUS)

    Hi team,

    I'm looking for a SQL query check data (ECC + CallVariable) due to a RESULT of SCRIPT EXECUTE when you ask an external VRU with a translation route to VRU with a 'run external Script '.

    In my view, that the data are analyzed between the termination call detail + termination call Variable.

    If you have already such a SQL query I would be very grateful to have.

    Thanks and greetings

    Nick

    Omar,

    respectfully, shorten the interval of a day might not be an option for a history report ;-)

    I recommend to take a look at the following SQL query:

    DECLARE @dateFrom DATETIME, @dateTo DATETIME

    SET @dateFrom = ' 2014-01-24 00:00:00 '

    SET @dateTo = ' 2014-01-25 00:00:00 '

    SELECT

    TCV. DateTime,

    TCD. RecoveryKey,

    TCD. RouterCallKeyDay,

    TCD. RouterCallKey,

    VME. EnterpriseName AS [ECVEnterpriseName],

    TCV. ArrayIndex,

    TCV. ECCValue

    OF Termination_Call_Variable tcv

    JOIN THE

    (SELECT RouterCallKeyDay, RouterCallKey, RecoveryKey IN Termination_Call_Detail WHERE DateTime > @dateFrom AND DateTime)< @dateto)="">

    THE tcv. TCDRecoveryKey = tcd. RecoveryKey

    LEFT OUTER JOIN Expanded_Call_Variable VME ON tcv. ExpandedCallVariableID = VME. ExpandedCallVariableID

    WHERE the tcv. DateTime > @dateFrom AND tcv. DateTime<>

    With variables, you can set up your code (for example, you could write SET @dateFrom =? and let the calling application to fill in the DateTime for you).

    In addition, join two large tables with all the lines, as you did (TCD - TCV) is never a good option.

    Another aspect to consider: all the ECC is actually arrays (always), is not good to leave aside the index value (tcv. ArrayIndex).

    G.

  • DB Link for MS SQL Server connectivity

    Hi all

    Is it possible to create the DB link in the Oracle to MS SQL server database.

    If yes then guide.

    Best regards

    Cecile

    VISHWAKARMAPARDEEP wrote:

    Hi all

    Is it possible to create the DB link in the Oracle to MS SQL server database.

    If yes then guide.

    Best regards

    Cecile

    refuses or is unable to use GOOGLE yourself?

    https://www.Google.com/search?q=create+DB+link+into+Oracle+database+for+MS+SQL+Server

  • Resources for learning SQL and PL/SQL?

    Dear Sirs and Madams,

    I am (as I explained in the post initially) student fact different database project. I want to learn Oracle SQL and PL/SQL. What are good resources for learning - I think that books and example scripts/SQL. Thanking, Rajiv.

    >

    I am (as I explained in the post initially) student fact different database project. I wish
    Learn the Oracle SQL and PL/SQL. What are good resources for learning - I
    think that the books and example scripts/SQL. Thanking, Rajiv.

    Well, let's first - become familiar with SQL * Plus - Oracle standard tool. Maybe it's a little 1980
    but it will be available on absolutely every system you use. As long as a student, I don't think you
    have a lot of money to spend on tools - so download Oracle's SQL developer tool (free)
    and experiment with it.

    On your own systems, there are already scripts - do (presumably in Unix - if Windows, use the search)
    Tool) - $ORACLE_HOME do you find. -name "*.sql" and watch the rdbms/admin scripts. In addition,
    There are a few free libraries available.
    http://www.Oracle-base.com/DBA/scripts.php
    www.rampant.cc/Internals.zip
    http://www.Oracle-Developer.NET/utilities.php (look at the MOAT).

    Then, after that, you could look at the site of Tanel Poder and Christian Antognini (both peak) also
    Google "Oracle SQL/PL/SQL script libraries.

    There are enough out there on the internet to keep you going for years :)

    For PL/SQL, the best authors are Connor McDonald and Steve Feuerstein, if you want to invest in
    a book.

    HTH,

    Paul...

  • DSN name for my sql * more

    Hello all;

    I googled this a bit but I need to check with the experts, where can I find the DNS for my sql * more

    user13328581 wrote:
    Hello all;

    I googled this a bit but I need to check with the experts, where can I find the DNS for my sql * more

    There is NO direct relationship between sqlplus & DNS.
    sqlplus just a SQL client can interface to 1 or more Oracle DBs.
    DNS is domain name Services; who provides the hostname IP # translation

    What problem are you trying to solve?

  • SYSTEM OF MONITORING plug-ins FOR MICROSOFT SQL SERVER - cost of licenses

    Hello

    We have the license for Oracle 10 g OEM. We intend to implement plugin of SYSTEM MONITORING for
    MICROSOFT SQL SERVER. We must buy separate license for this Plugin.

    Ritesh

    On in the technology price list
    Look for "System Monitoring Plug-in for Non Oracle Databases"

  • metric for Microsoft SQL Server

    I'm looking for the settings for Microsoft SQL Server reference manual. He can't find on the website of the documentation

    Please check at http://download-west.oracle.com/docs/cd/B16240_01/doc/em.102/b28748/toc.htm

  • worker for JTFLINS.sql could not all maintaining multilingual tables

    Hello

    I install a new language pack for R12.1.2, dB 11.2.0.1) already 4 lanuages installed (English, German, Dutch, Spanish)

    While mainataining tables multilingual

    worker does not work for JTFLINS.sql

    contents of the log file are
    sqlplus -s APPS/***** @/u03/oracle/MST/apps/apps_st/appl/jtf/12.0.0/sql/JTFNLINS.sql
    Connected.
    
    PL/SQL procedure successfully completed.
    
    
    MESG
    --------------------------------------------------------------------------------
    LANGUAGE=AMERICAN
    PACKAGE=JTF_UM_APPROVALS_PKG
    SQLERRM=ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: Oracle Text error:
    DRG-11422: linguistic initialization failed
    DRG-11446: supplied knowledge base file /u03/oracle/MST/db/tech_st/11.2.0/ctx/da
    ta/enlx/droldUS.dat not installed
    
    
    select to_date('ERROR')
                   *
    ERROR at line 1:
    ORA-01858: a non-numeric character was found where a numeric was expected

    Hello

    Have you completed all the steps according to the (Oracle Applications NLS Release Notes, version 12.1 [788053.1 ID])?

    Please see if (Adworkers fail using Adadmin "maintain multilingual tables" task [390280.1 ID]) applies. If the document does not help, I would say that you connect a SR.

    Thank you
    Hussein

  • The call for a SQL Server SP in PL/SQL Server

    I'm currently run a remote stored procedure (SP) on the system of MS SQL Remote Oracle Server.

    It is where I am currently and if I'm not mistaken this call must be correct:

    ---------
    DESC 'dbo '. "GetIdByLoginEmail"@mssql
    PROCEDURE GetIdByLoginEmail"@mssql
    Name of default input/output argument type?

    @login VARCHAR2 IN
    @email VARCHAR2 IN
    result_set_handle REF CURSOR OUT

    * refcursor variable r *.
    * exec "dbo." "GetIdByLoginEmail"@mssql('test','[email protected]',:r) *.
    BEGIN "dbo." "GetIdByLoginEmail"@mssql ('test', '[email protected]',: r); END;

    *
    ERROR on line 1:
    ORA-28500: connection between ORACLE and a non-Oracle system has sent this message:
    [Transparent gateway for MSSQL] [A04B] An incorrect number of parameters passed to saved the query specification
    dbo. GetIdByLoginEmail(). It has 3 parameters and not 2 as indicated.
    ORA-06512: at line 1
    ----------

    Anyone has an idea why this call fails? I can't find a lot of resources on this topic.

    Take a look at Metalink note:
    Article no.: Note 351400.1
    Title: How to call a remote procedure to Sybase using TG4SYBS

    It was written for TG4SYBS, but works for MS SQL Server, too.
    This note contains a sample how to call a foreign procedure using ref Cursor through the gateway.

Maybe you are looking for

  • Re-install Microsoft Office 2010 without success

    Dell Inspiron N7110, Microsoft Windows 7 version 6.1.7601 Service Pack 1 build 7601, recently downloaded from Digital River and activated.  Download Microsoft Office Home & Student 2010 came preinstalled on the computer.  It's a direct download throu

  • Product key for Windows Server 2008 R2 OEM becomes key to retail

    Hello I'm a developer attempts to deploy Windows Server 2008 R2 with Windows OPK. The machine, I am preparing has embedded OEM product key and Microsoft Genuine Advantage Diagnostic Tool (MGADiag.exe) shows the Type of product as ID: 3 OEM System Bui

  • Changing the beta version code from Beta2

    Hello again, I worked on a twitter feed getting charged through the solution found hereJSON data analysis, however the Beta 2 of the NDK shows a new error I have ever had with the original beta version... The following code gives me an error 'Uknown

  • BlackBerry smartphones panic

    Less than 10 minutes ago I have finally updated my Torch9810 to a new package. I had myself prepared to protect any disrepancies regarding information removed via blackberry. But when I'm out again, several of my apps remained, but I couldn't find th

  • Registration / login Panel for new users in Adobe Muse CC

    HelloHow can I make a registration/login Panel in Adobe Muse CC? Or the button "sign up using facebook"?