Try using for the first time - ORA-28234 dbms_crypto

Hello

I try to use dbms_crypto for the first time and I'm getting ORA-28234 key too short. I ran a separate test: P2_KEYVAL with utl_raw.length (utl_raw.cast_to_raw(:P2_KEYVAL)) et il retourne à 128 caractères, qui est ce que je pense que je suis censé pour viser pour, mais c'est tout nouveau pour moi.) Any suggestions?

Here's the code.
DECLARE
   output_string      VARCHAR2 (200);
   encrypted_raw      RAW (2048);             -- stores encrypted binary text
   decrypted_raw      RAW (2048);             -- stores decrypted binary text
   key_bytes_raw      RAW (128);              -- stores 128-bit encryption key
   encryption_type    PLS_INTEGER :=          -- total encryption type
                            DBMS_CRYPTO.ENCRYPT_AES128
                          + DBMS_CRYPTO.CHAIN_CBC
                          + DBMS_CRYPTO.PAD_PKCS5;

                    
BEGIN
     select utl_raw.cast_to_raw(rpad(:P2_KEYVAL,128,0)) into key_bytes_raw from dual;
     encrypted_raw := DBMS_CRYPTO.ENCRYPT
      (
         src => UTL_I18N.STRING_TO_RAW (:p2_INPUT,  'AL32UTF8'),
         typ => encryption_type,
         key => key_bytes_raw
      );
    -- The encrypted value "encrypted_raw" can be used here
   htp.prn ('Encrypted value: ' || encrypted_raw);
END;
ORA-28234: too short key length

A quick test shows that a 16-character password works:

DECLARE
  p2_input           varchar2(200) := 'this is a test';
  p2_keyval          varchar2(128 byte) := 'password';
  success boolean := false;
  output_string      VARCHAR2 (200);
  encrypted_raw      RAW (2048);             -- stores encrypted binary text
  decrypted_raw      RAW (2048);             -- stores decrypted binary text
  key_bytes_raw      RAW (128);              -- stores 128-bit encryption key
  encryption_type    PLS_INTEGER :=          -- total encryption type
                          DBMS_CRYPTO.ENCRYPT_AES128
                        + DBMS_CRYPTO.CHAIN_CBC
                        + DBMS_CRYPTO.PAD_PKCS5;
BEGIN
  while not success AND LENGTH(p2_keyval) < 512 loop
    begin
      key_bytes_raw := utl_raw.cast_to_raw(P2_KEYVAL);
      encrypted_raw := DBMS_CRYPTO.ENCRYPT
        (
           src => UTL_I18N.STRING_TO_RAW (p2_INPUT,  'AL32UTF8'),
           typ => encryption_type,
           key => key_bytes_raw
        );
      SUCCESS := TRUE;
    EXCEPTION
      WHEN OTHERS THEN
        P2_KEYVAL := P2_KEYVAL || 'X';
    END ;
  end loop;
  dbms_output.put_line('PASS ('||LENGTH(p2_keyval)||'): '||p2_keyval);
  dbms_output.put_line('RAW PASS LEN: '||LENGTH(key_bytes_raw));
  dbms_output.put_line('Encrypted value: ' || encrypted_raw);
END;
/

PASS (16): passwordXXXXXXXX
RAW PASS LEN: 32
Encrypted value: 5D39A532A468F04605E02AEC50F21B20

Published by: Sentinel on December 5, 2008 13:45

Tags: Database

Similar Questions

  • I try to add an image map for the first time using Dreamweaver CC

    I am trying to add an image map for the first time using Dreamweaver CC in an html site.

    I can get map controls is displayed when I select the image in the code, and I can select the rectangle tool.

    However, when I try to select the area of the image disappears from the section of the map of the properties viewer and I can't select the area for my hyperlink.

    What I am I missing videos online are it seems so simple, but something with my page is not allowing me to withdraw this.

    This is the code section and the image that I'm trying to add the link.

    < side class = "sidebar" >

    < img src = "images/flowchart.jpg" alt ="product dev. Flowchart">

    < / side >

    Please help or give me any advice... There might be something to do with the fact that my site is "sensitive"?

    Hello

    You could just add links to each box, but a better solution would be to use svg for this. Unfortunately, it is easier for me to write for someone who does not know svg to do.

    If you have Adobe Illustrator create your svg using this program, then it would be a case to add links manually to each box created in the svg code. SVG is an xml-based language and not a real image, even if this is how a browser will display the it.

    PZ

  • TreeSize Professional - using this tool for the first time - need help to run the report

    Using TreeSize Professional for the first time and I need search records to analyze documents containing invalid characters and path names that are too long.  We are moving the content in SharePoiint and SharePoint will not accept path names that are more than 250 characters and invalid characters.

    Does anyone know how to do this research?

    [Moved from the community centre of Participation]

    What is a TreeSize question or a question of SharePoint?

    Try SharePoint forums on the left side of

    https://social.technet.Microsoft.com/forums/en-us/home?category=SharePoint&filter=AllTypes&sort=lastpostdesc

    Don

  • For psc 1315: before you can use this feature, OneNote 2010 must start for the first time.

    I installed the downloaded software (Windows 7) for my old psc 1315 (all-in-in-one). It printed the page sample after installation, but when I want to print what this or else it gives me the following message is displayed:

    "Before you can use this feature, OneNote 2010 must start for the first time."

    Restart the PC does not solve the problem either. How can I get the printer to work?

    Hello pietpompies7

    See the following Microsoft Office Blog article. It deals with OneNote arise while you try to print.

    Microsoft OneNote is misuse of your print jobs?

  • ICloud using photo library for the first time

    I am considering switching to iCloud photo library for the first time - mainly so I'll be able to use the new functionality of memories in iOS 10. However, I have quite a large library of Photos on my Mac and I'm worried about the mistakes of synchronization, bugs and any damage my irreplaceable photos. I have a Time Machine backup, but each backup on which generally only lasts a week or so, and with a large library of errors can take some time to appear. Should I be worried? Are there precautions I need to take?

    In view of all the people who use it, there are very few messages on issues. Since you have a backup, you can still recover. You can consider to get a 2nd external and make a copy of your photo library in order to have 2 backups. Depending on the size of your library, you may need to purchase additional iCloud storage as free storage space is 5 GB. With a large number of photos, it will take much time to complete the synchronization. Some people have posted their s took 2 to 4 weeks. Our respective synchronization went well and we had no problem.

    Downgrades and upgrades of storage

  • I m using firefox on mac. I used it for the first time on mac while I had put a lot of "separators" on the bookmarks toolbar... How to remove the xtra those? Small request that it creates big problems...

    Well not much description required in this case. I was using firefox for the first time on a mac and so was trying new things with this version of firefox. Just got stuck with these separators xtra... Can't find a way to get them off of my bookmarks toolbar...

    You can open the Bookmark Manager (Bookmarks > show all bookmarks) and go to the Favorites bar folder in the left pane.
    You can then remove the separators in the right pane.

  • I installed ux 16 driver Windows 7 my pc but nothing displays, no .so tracks what is wrong with it please suggest.or how can I do this by using midi for the first time.

    I installed driver ux 16 in my widows 7 and connected to my pc but nothing displays, no .so tracks what is wrong with it please suggest.or how can I do this by using midi for the first time.

    In the subject line, type a brief description of your problem or your question. A subject line that says only "Hi alll" not will receive the attention of someone who can be familiar with your particular situation.

    Contact the support of Yamaha.

  • For the first time using BMP - app ever built, plugin file error constant

    Hello - I am trying to build for the first time and many plugins are errors. I am commenting them one at a time from the XML config and one of the culprits is the plugin file that I need to use. The other is the network plugin which also gives errors. The State errors that are not compatible with CLI 6.3.0

    I know it's the plugin developer to make compatible - y at - it something somewhere that indicates which versions of the plugins are compatible with versions of BMP? How can I find out what previous version of BMP is compatible with anything?

    Also, and this might be relevant to the question - when I look at the BMP to see what are the versions that I build for, I see that apparently I'm targeting iOS4.2?

    http://www.rickluna.com/pgb_err.PNG

    In my XML I'm deploying to iOS 9 but does not change the value of GBP v 4.2

    < preference name = "deployment target" value = "9.0" / >

    DRM for suggestions!

    r

    These plugins are all using the deprecated point rating. You must use:

    etc.

    Can I ask where you got to go to? I want to assure you that the resource is updated to the correct format.

  • Always incompatible error when using the app for the first time

    We get the following error every once in a while when you realize an IISReset and newspaper, GSM or SCRM or NDP (have not tested the other apps) for the first time.  The only recovery of this seems to be to make an another IISReset and try again keep doing so until the stop occurring.  Does anyone else have this problem?

    Exceptions: System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ApplicationException: could analyze not String Boolean value: "${UserInRole:CP_SYSTEM_ADMIN} '-> System.FormatException: string was not recognized as a valid Boolean value.

    at System.Boolean.Parse (String value)

    at Xeno.Web.UI.NavigationControls.Builder.Helper.AttributeSetter.ParseBooleanValue (String attributeValue)

    -End of the exception stack trace internal-

    at Xeno.Web.UI.NavigationControls.Builder.Helper.AttributeSetter.ParseBooleanValue (String attributeValue)

    at Xeno.Web.UI.NavigationControls.Builder.Helper.AttributeSetter.SetAttributeValue (String attributeName, attributeValue, menuObj, Boolean isIgnore Object String)

    Xeno.Web.UI.NavigationControls.Builder.YApplicationMenuBuilder.BuildMenuItem (model IMenuModel, BaseMenu menuToBuild)

    Xeno.Web.UI.NavigationControls.Builder.YApplicationMenuBuilder.BuildMenuItem (model IMenuModel, BaseMenu menuToBuild)

    Xeno.Web.UI.NavigationControls.Builder.YApplicationMenuBuilder.BuildMenuItem (model IMenuModel, BaseMenu menuToBuild)

    Xeno.Web.UI.NavigationControls.Builder.YApplicationMenuBuilder.Build (model IMenuModel)

    to Xeno.Web.UI.NavigationControls.NavigationControlContainer.OnInit (ByVal e As EventArgs)

    Oracle support should be able to provide a help file, AssembliesPage.aspx, that you can place in your WebCommon directory. When you then navigate to this page in the URL, it will try to load all the dll dependent and relevant. If one of the required DLL is not found, it should give you a message at the bottom of the page showing you what dll (if any) was absent. It is the most common cause associated with this type of error reported. If you add the missing dll, dealing with the issue.

    You can access the support page by typing the address bar something like the following:
    https:// /gsm/WebCommon/AssembliesPage.aspx
    This assumes that you have placed the page in the directory web\WebCommon

    - - - -
    Kind regards

    Ron

  • The use of Premiere Elements for the first time, cannot open the prproj file

    Help!  I use Premiere Elements for the first time, and I can't open a prproj file

    You're absolutely right, prproj's Premiere Pro.

  • for the first time using the do not know how to insert video to start editing

    for the first time using the do not know how to insert video to start editing

    First thing you need to know is that After Effects is not a video editor. First is to put some shots together to tell stories (that is changing), After Effects for creating those shots (compositing and Visual effects) and to create animated graphics.

    To use AE, start here: starting After Effects

  • You try to run the Vertex vprtmupd for the first time

    I am trying to run the Vertex vprtmupd for the first time on a new Linux installation. I'm on 11.5.10.2 and that you ran as the "Quantum program Setup ' without problem has a great!

    I tried to run "Quantum Data Update install" and it failed with this error:

    HR_6882_HRPROC_ASSERT
    LOCATION py3vntsetup:2
    APP-PAY-06882: Assertion failure detected at the location py3vntsetup:2.

    Cause: an internal error has occurred at the location py3vntsetup:2.

    Action: contact your Oracle customer representative.


    I then tried to run, he manuly by typing 'vprtmupd' and this is what happened:


    Selection of a monthly update function
    --------------------------------
    1 - update of the tax base
    2 - program output

    Select: 1

    Starts the update process monthly payroll tax.

    Enter the Data Source: /u01s/app/oracle/appl/pay/11.5.0/vendor/quantum/data
    Cannot establish a connection with the database of the payroll tax. Check the
    information entered and try again.
    Press Enter to continue...


    CAVEAT! The update process will destroy the contents of the
    current database before creating a new. Please do
    a backup before continuing.

    Any idea? It seems that I need the tax database created before the "vprtmupd" program works. How to create the tax database for the first time?

    I tried to run "Quantum Data Update install" and it failed with this error:

    HR_6882_HRPROC_ASSERT
    LOCATION py3vntsetup:2
    APP-PAY-06882: Assertion failure detected at the location py3vntsetup:2.

    Search MOS 'APP - COMPENSATION - 06882 Quantum' and go through the docs (see below first).

    Enter the Data Source: /u01s/app/oracle/appl/pay/11.5.0/vendor/quantum/data
    Cannot establish a connection with the database of the payroll tax. Check the
    information entered and try again.
    Press Enter to continue...

    Please see if (the Vertex 'diagnos' program fails with "open base failed" [760411.1 ID]) applies.

    Thank you
    Hussein

  • Photo PhotoSmart 7520 tray is blocked when I try to print photo 4 x 6 for the first time.

    I just bought this 7520 and installed the software; then when I tried to print a picture for the first time, I kept getting the error message that the photo tray is locked (will not travel to bottom to pick up the blank photo paper) even if no clogging. The call centre could not solve the problem, and they ship me a replacement printer; but I suspect that this may be a common problem.

    I searched the post, and someone else had the same problem.  The solution is that the tab on the slide of paper size was outside the slide area.  I fixed it, and the printer now prints pictures.

  • I use a USB device for the first time. My computer windows Xp does not recognize. How can I fix this prob, and where can I get the info to fix it?

    When I insert my USB for the first time, it is said that it has malfunctioned, and windows does not recognize it. Am I missing driver for USB or what? I need step by step instructions on how to fix this prob. I'm an amateur. Thank you.

    I need step by step instructions on how to fix this prob. I'm an amateur. Thank you.

    Step 1.  Identify the make and model of the USB device.
    Step 2: Identify the version of Windows XP you have, including service pack (start > run > winver > OK)

    Although the following steps 1 & 2 you could get extra help, I suspect that the 'USB device' has indeed "defective" and you have to go back to where you got it and request a refund or a replacement.

  • CD or DVD not detected for the first time, always detected on insert it again.

    Whenever I insert a CD or a DVD into my DVD drive, the drive is not detected. No contents of the drive is displayed in Windows Explorer. I see the drive to read the disc, as indicated by the green light flashing, but nothing happens. This problem is always solved by reinserting the disc. I don't know why I have to insert each disk twice each time so to be read and any help would be greatly appreciated. When I insert the DVD for the first time, its content is not considered in the Windows Explorer, however, he begins to play when I open my DVD playback software and click on the play button. I have Windows XP Professional SP3.

    Hello

    1. don't you make changes to the computer until the problem occurred?

    I suggest you to try the steps below and check if it helps.

    Method 1: Your CD or DVD drive cannot read or write media

    http://support.Microsoft.com/mats/cd_dvd_drive_problems/en-us

    Method 2:
    The article below describes how to troubleshoot common problems that may occur when a Windows XP-based computer cannot read a CD or a DVD in a CD or DVD drive. This article contains several methods that you can use to try to solve these problems, and it also includes some advanced troubleshooting steps.
    How to troubleshoot common problems that occur when a Windows XP-based computer cannot read a CD or DVD:
    http://support.Microsoft.com/kb/321641/

    See also:
    How to manage devices in Windows XP
    http://support.Microsoft.com/kb/283658

    Hope this information is useful.

Maybe you are looking for