How to mask and unmask a creditcard number in oracle

Hi,
Is there a way to mask a creditcard number from
"1234-5678-4321-8765" to "XXXX-XXXX-XXXX-XXXX" and unmask it back to readable format
using regular expressions in oracle?
Thanks in advance

yes, You can.
With the demonstration at the link I earlier provided; see the testing of Encryption as well as Decryption.
declare
    cursor c_cur is
        select uname, password from encryption;
begin
    delete encryption where 1 = 1;
    dbms_output.put_line('Starting Block...');
    insert into encryption values (1, 'purvesh', 'purvesh');
        dbms_output.put_line('Before Encryption');   
        for rec in c_cur loop
        dbms_output.put_line('UName :: ' || rec.uname || '; Password :: ' || rec.password);
        end loop;
        dbms_output.put_line('');
    user_security.update_user_password ('purvesh', 'purv');
        dbms_output.put_line('After Encryption');
        for rec in c_cur loop
        dbms_output.put_line('UName :: ' || rec.uname || '; Password :: ' || rec.password);
        end loop;
        dbms_output.put_line('');
dbms_output.put_line('Decryption!!!');
        for rec in c_cur loop
            dbms_output.put_line('Original Password for purvesh is ' || user_security.decrypt(rec.password ));
end loop;
    commit;
    dbms_output.put_line('End Block...');
end;
Starting Block...
Before Encryption
UName :: purvesh; Password :: purvesh
After Encryption
UName :: purvesh; Password :: 6ACBD318D9B3EFA0
Decryption!!!
Original Password for purvesh is purv
End Block...

Similar Messages

  • How to mask and unmask screen fields?

    Hi,
        I have a PNP LDB selection screen. Also I have an extra Key Date field at bottom ( apart from the std period selection ) , which is defined by me.If i enter some value in a particular field say, Action Type, I need to make my Key Date field an input field. But if the user does not enter any value in Action Type, then the Key Date field has to be grayed out. Right now what happens is , after i input something to Action Type, I need to press 'Enter' key to make the Key date active.
    I am looping the screen in At sel screen o/p.  But , I dont want to press enter key. The moment i type something into Action type field, I need the other field to be active, just like the case of radiobuttons.Is ther any way out for this? Pls help....
    Thanks in advance...
    Mahesh

    It's more that we're dealing with "block mode" communication from the GUI to the app server, so data only travels from the user to the program when some function is selected.
    So there is a way if you were to set up your Action Type as a listbox (and assuming you are on a recent SAP release)... as per the example below.  This ties a user command into the change of a listbox setting - this example is for fun only of course, but if listbox1 is changed then the date opens, and if listbox2 is changed, it locks again.
    Hope this helps.
    Jonathan
    report zlocal_jc_sdn_listbox_ucomm.
    type-pools:
      vrm.
    data:
      g_unlock             type sap_bool.
    parameters:
      p_bukrs1             like t001-bukrs as listbox visible length 15
                             user-command zcc01,
      p_bukrs2             like t001-bukrs as listbox visible length 15
                             user-command zcc02,
      p_date               like sy-datum.
    initialization.
      perform listbox_values_fill.
    at selection-screen output.
      perform at_selection_screen_output.
    at selection-screen.
      perform at_selection_screen.
    start-of-selection.
      format reset.
      write: / 'Listbox 1 - you chose:', p_bukrs1.
      write: / 'Listbox 2 - you chose:', p_bukrs2.
    *&      Form  at_selection_screen_output
    form at_selection_screen_output.
    * Toggle lock / unlock
      loop at screen.
        if screen-name = 'P_DATE'.
          if g_unlock is initial.
            screen-input = '0'.
          else.
            screen-input = '1'.
          endif.
          modify screen.
        endif.
      endloop.
    endform.                    "at_selection_screen_output
    *&      Form  at_selection_screen
    form at_selection_screen.
      case sy-ucomm.
        when 'ZCC01'.  "CC 1 changed
          g_unlock = 'X'.
        when 'ZCC02'.  "CC 2 changed
          g_unlock = ' '.
      endcase.
    endform.                    "at_selection_screen
    *&      Form  listbox_values_fill
    form listbox_values_fill.
      data:
        l_id                type vrm_id,
        lt_value            type vrm_values,
        l_value             like line of lt_value.
    * Listbox 1:
      l_id = 'P_BUKRS1'. "name of variable in screen
      l_value-key = '1000'.
      l_value-text = 'London'.
      append l_value to lt_value.
      l_value-key = '2000'.
      l_value-text = 'New York'.
      append l_value to lt_value.
      l_value-key = '3000'.
      l_value-text = 'Canberra'.
      append l_value to lt_value.
      call function 'VRM_SET_VALUES'
        exporting
          id     = l_id
          values = lt_value.
    * And re-use the list for listbox 2
      l_id = 'P_BUKRS2'. "name of variable in screen
      call function 'VRM_SET_VALUES'
        exporting
          id     = l_id
          values = lt_value.
    endform.                    "listbox_values_fill

  • How to Install and Configure Workflow For PO in Oracle Apps Version R12

    Hi,
    Please do let me know how to install and configure Workflow for Purchasing in Oracle Apps R12 Version.
    I want to the standard setup of workflow configuration for the PO.
    Thanks and Regards
    Srini

    Hi Suresh
    Only the latest version of WLP which is WLP 10.3.2 has facility to integrate with Oracle UCM with Adapaters. So make sure that you do have this latest version of WLP 10.3.2. Older versions like WLP 10.3 do not have this provision.
    Also I guess when you install and configure this Oracle UCM Adapater and choose above WLP Home, I guess these modules may be added in already installed WLP folders. I checked on my side for WLP 10.3.2 and I could NOT find the modules you mentioned. So most probably you may be missing some installation/configuration stuff from UCM side.
    Thanks
    Ravi Jegga

  • How to view and change SMTP port number in new account setup in "Mail" 10.6

    When I try to set up and test a new email account addressing an SMTP server that seems to e using a nn-standard port number, how on earth can I even look at the port number assigned by default to a new account in Apple Mail 10.6 setup ?
    I might have to trial and error different port numbers but when Mail tries to test the connection to the SMTP server after I enter its address, it just spins and hangs up. I suspect the reason is a wrong port number. How do I change that outgoing port number in Apple Mail ??
    There seems to be no obvious way the program will let U do it or even let you view the port it assigns in apparent error.

    there is no way to change the smtp port during the original account creation. you can usually wait Mail out if it's spinning its wheels at this point. I've had to wait about 15-20 minutes a few times. eventually Mail lets you through even if it fails to connect to the smtp server. then, once the account is created you can edit the smtp server and try a few different ports and settings. that's done in system preferences->accounts. click on teh smtp server at the bottom and select 'edit smtp server list". then in the popup click "advanced".

  • How to mask and format an input field at the same time?

    Dear Experts,
    I need to have an input field, which has the following behavior:
    1. The input field accepts only number, i.e. characters other than number are ignored (not displayed on the text field).
    2. The number is automatically formatted to ###,###,### as the user enter the number.
    Example as the user enter 1-2-3-4-5-6-7, the sequence of number displayed in the text field is:
    1
    12
    123
    1,234
    12,345
    123,456
    1,234,567
    I have done the following:
    import java.awt.*;
    import javax.swing.*;
    import java.text.*;
    import javax.swing.text.*;
    class FormattedTFDemo {
         NumberFormat cf;
         JLabel jlab;
         JFormattedTextField jftfSalary;
         JFormattedTextField jftfEmpID;
         JButton jbtnShow;
         public FormattedTFDemo() {
              JFrame jfrm = new JFrame("JFormattedTextField");
              jfrm.getContentPane().setLayout(new FlowLayout());
              jfrm.setSize(240, 270);
              jfrm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              try {
                   MaskFormatter mf = new MaskFormatter("###,###,###");
                   jftfEmpID = new JFormattedTextField(mf);
              } catch (ParseException exc){
                   System.out.println("Invalid Format");
                   return;
              jftfEmpID.setColumns(15);
              cf = new DecimalFormat("###,###,###");
              jftfSalary = new JFormattedTextField(cf);
              jftfSalary.setColumns(15);
              jftfSalary.setValue(new Integer(7000));
              jfrm.getContentPane().add(new JLabel("First field"));
              jfrm.getContentPane().add(jftfEmpID);
              jfrm.getContentPane().add(new JLabel("Second field"));
              jfrm.getContentPane().add(jftfSalary);
              jfrm.setVisible(true);
         public static void main(String[] args) {
              SwingUtilities.invokeLater(new Runnable() {
                   public void run() {
                        new FormattedTFDemo();
    }The "First field" adopts no. 1 behavior, i.e. it does not allow any character other than numbers, but the "," are always displayed and the number displayed as I enter 1-2-3-4-5-6-7 are:
    1 , ,
    12 , ,
    123, ,
    123,4 ,
    123,45 ,
    123,456,
    123,456,7
    which is not according to behavior no. 2
    The "Second field" displayed 1,234,567 only after the focus left the text field and not while typing. Moreover, characters other than number can still be displayed and only rejected after the focus left the text field.
    I need a guide of what text field and what filter / format / mask I should use. Am I correct to use JFormattedTextField? Is the only way to accomplish this by using JTextField and create my own PlainDocument for the textfield, where
    I rebuild the displayed output after each character is entered?
    Thanks for any advice,
    Patrick

    So exactly what do you want the user to put in? and what do you want to see?
    I need to have an input field, which has the following behavior:
    1. The input field accepts only number, i.e. characters other than number are ignored (not displayed on the text field).
    2. The number is automatically formatted to ###,###,### as the user enter the number.
    Example as the user enter 1-2-3-4-5-6-7, the sequence of number displayed in the text field is:
    1
    12
    123
    1,234
    12,345
    123,456
    1,234,567The user should type only numbers and when he types other than numbers, the field ignore it.
    What I want to see, as the user, for example, types 1-2-3-4-5-t-6-7 is:
    1
    12
    123
    1,234
    12,345
    <beep / ignore> (because t is invalid)
    123,456
    1,234,567
    Thus, I need a guide of what swing components should I use to accomplish this task. If you can give me the code, that will be perfect.
    Hope you can advise me,
    Patrick

  • How to stop and start only the process of Oracle Application Express?

    I'd like to know how to stop the process of Oracle Application Express on my server installed oracle express package.
    After installed Oracle Express edition, not only oracle database server processes but also Oracle Application Express, such as http server, is started automatically...
    I hope to stop and start Application Express on demand but is this feature enabled?

    Oracle Apex is an API, if that helps you understand / visualize. You do not start Apex process nor stop it.
    When an Apex session starts it starts calling the API.
    You can however start / stop the listener. It may be OHS, ApexListener and the J2EE container running it, OC4J or any other "server" that you are using.
    The built-in EPG is something like an API again, you cannot start / stop it but you can disable/enable it with DBMS_XDB.SETHTTPPORT API.
    Regards,

  • How to store and use the BLOB data in Oracle 11G?

    Recentlly,when I tested the Blob data in Oracle11G ,I found that there were too many differences between the SQL
    Server and the Orcale on the capabilities.In Orcale ,I created the table like this:
    create table point
    xid number(10) primary key,
    North number(30,15) default null,
    West number(30,15) default null,
    South number(30,15) default null,
    East number(30,15) default null,
    Area number(30,15) default null,
    Len number(30,15) default null,
    Geometry BLOB default null
    organization index overflow
    tablespace "Tab1"
    lob (Geometry) store as securefile
    tablespace "Tab1"
    enable storeage in row
    chunk 4096
    pctversion 20
    nocache
    no logging
    compress high
    and I stored 10248 rows in this table,
    then ,I used "select geometry from point where xid > ? and xid < ?" as the testing SQL langauage in Java and the
    programme runed once per 5000 pieces of memory.
    the total time used in Orcale is twice more than that in SQLServer.In my Application programs, once the same
    orders runed,their differences were three times and more.As usually,the capability of Orcale is more strongger
    than the SQLServer.Why?

    select geometry from point where xid > ? and xid < ?"Does an index on XID exist?
    Are statistics current for table & indexes?

  • How to deploy and run Spring petportal example on Oracle portal?

    Is there any how-to steps or article show the petportal (Spring portlet MVC) example deploy and run Oracle portal?

    Hi,
    I haven't tired this, but I looked at the "README.txt" file included in the Spring PetPortal Application & it uses the standard JSR 168 Portlet standards.
    Hence, I assume that this would work as with any other remote portlet Implementation - host the portlet remotely & consume it in Oracle Portal 10.1.4.
    I just noticed that it has been 8 days since you posted the question - have you tried anything already ? If yes, what are your experiences so far ?
    Regards,
    Sandeep

  • How to setup and send mails using utl_mail on Oracle E-Biz R12

    Dear All
    There is a new requirement from client to setup and send mails using utl_mail utility on Oracle EBS R12.1.1
    What is utl_mail utility ? what is the difference between Workflow Notification Mailer and this utility/tool?
    What are etiquette's to pursue mail functionality in apps / db?
    - Chetan

    What is utl_mail utility
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_mail.htm
    How to Use the UTL_MAIL Package [ID 269375.1]
    FAQ and Known Issues While Using UTL_SMTP and UTL_MAIL [ID 730746.1]
    Master Note For PL/SQL UTL_SMTP and UTL_MAIL Packages [ID 1137673.1]
    Workflow Notification Mailer:
    you can send email using workflow notification email procedures,These ar built into the system and only need some minor configuration. check Workflow Administrator's Guide, Chapter 2, Section: Setting Up Notification Mailers for more detail.

  • How to store and retrive images in oracle database

    hi,
    i am interested in storing some students pictures ( photos) into my oracle database, and i want to know since the images are considered as binary data and since BLOB and CBLOB and supported by oracle, how to insert and to select the picture from oracle from my swing-based application?
    does anyone have a complete sample or tutorial doing that well!!
    thx

    Mira este link,
    hay varios articulos interesantes.
    http://www.oracle-base.com/articles/9i/Articles9i.php
    tambien puedes consultar este link
    http://tahiti.oracle.com/pls/db92/db92.homepage
    completa los coampos solicitados con la palabra "Images"
    hay un manual de LOBs muy completo

  • How to read and upload microsoft word file into database using forms9i

    Hi,
    How to read and upload microsoft word file into oracle database using forms9i. I appretiate if anyone can send me example or atleast a sujjetion.
    Thanks in advance
    Mahesh Ragineni

    The webutil package includes the ability up upload from the client to the database. See otn.oracle.com/products/forms and click on webutil for more details.
    Regards
    Grant Ronald
    Forms Product Management

  • How to unmask my phone number

    Hi,
    When I call my contact with my Iphone5, my number is masked and I don't know how to unmask it, can sombody help me please?

    I just tried with my brother and he said that he see's my number. But when I try to call my son's phone, Galaxie S3, my number still show mask

  • How to lpad and format a number column

    Hi,
    I have a requirement to format a number column and then lpad with '*' to 12 characters. For example if the column value is 1234560 then i have to display it as *****1,234,560.00. I tried using <?xdofx:lpad(format-number:AMOUNT;'999G999D99',12,'*')?> and <?xdofx:lpad(to_char(AMOUNT,'999,999,99.99'),12,'*')?>.
    Can any1 suggest me how to lpad and format the value.
    Thanks in advance.

    Hi,
    Use the following syntax for the lpad function, and use the MS word format mask for the formatting part. <?xdofx:lpad(AMOUNT,12,'*')?>

  • I have aperture 3.2.4 on my laptop and have the serial number, but just bought a new MAC and I can't get the Ver 3.0 link to work. Anyone know how to move it from my laptop to our new mac?

    I have aperture 3.2.4 on my laptop and have the serial number, but just bought a new MAC and I can't get the Ver 3.0 link to work. Anyone know how to move it from my laptop to our new mac?

    I am talking about the Ver 3 download link that came with the purchase email.
    That link is no longer available. Use "Migration Assistant" to copy your Applications from your old mac to the new Mac, then immediately run software update. Aperture Version 3.2 will not run on your new mac with Mavericks, you will have to Upgrade to version 3.4.5 at least - you can download this update from the Support page: Aperture 3.4.5
    Then launch Aperture and enter your registration key and try now too update from version 3.4.5 to 3.5 from the AppStore. The AppStore will change your Aperture registration to an AppStore version, so you will able to reinstall by downloading from the AppSTore in future.
    If you want transfer only Aperture and no other applications, do it manually: You will have to copy not only the application but folders from the libraries as well:
    /Applications/Aperture.app
    /Library/Application Support/Aperture/
    ~/Library/Application Support/Aperture/
    Leonie

  • How do I change a cell phone number on my iPad. I have a new cell phone number and want to use the iCloud

    How do I change my cell phone number on my iCloud account with my iPad? I have a new number and want to activate the iCloud

    If you're talking about the phone number on your iPad for iMessage, the number is associated with the ID when you turn on iMessage on your iPhone.  If the number is incorrect, try turning off iMessage on your phone, wait a minute or so, then turn it back on.

Maybe you are looking for