Extracting encrypted in a table on DB2 with Perl

Discussion in 'Perl Misc' started by rparimi@gmail.com, Dec 10, 2004.

  1. Guest

    Hi,

    A table on my DB2 database has encrypted data, and I wish to extract
    it. I have written the DBI code to connect to the database, and read
    all values from the column I want. However, I am not sure if the data
    that the perl script retrieves from the database is the "correct"
    encrypted data. I know that DB2 has its own format for storing
    encrypted data, but do not know how to process this data (using a pack
    or unpack?)


    When I run a select on the table from a db2 prompt, a row in the table
    looks like as:

    1 x'D6B6D2EE0C57ADF2'

    What transformation do I need to apply to the binary data stored in a
    perl scalar variable to make sure that I am working with the right
    encrypted data?

    Thanks a lot..
    , Dec 10, 2004
    #1
    1. Advertising

  2. Anno Siegel Guest

    <> wrote in comp.lang.perl.misc:
    > Hi,
    >
    > A table on my DB2 database has encrypted data, and I wish to extract
    > it. I have written the DBI code to connect to the database, and read
    > all values from the column I want. However, I am not sure if the data
    > that the perl script retrieves from the database is the "correct"
    > encrypted data. I know that DB2 has its own format for storing
    > encrypted data, but do not know how to process this data (using a pack
    > or unpack?)
    >
    >
    > When I run a select on the table from a db2 prompt, a row in the table
    > looks like as:
    >
    > 1 x'D6B6D2EE0C57ADF2'
    >
    > What transformation do I need to apply to the binary data stored in a
    > perl scalar variable to make sure that I am working with the right
    > encrypted data?


    What makes you think Perl programmers are particularly qualified to
    answer this? The fact that you are using Perl to connect to the
    Database is not relevant.

    Anno
    Anno Siegel, Dec 10, 2004
    #2
    1. Advertising

  3. wrote:

    > Hi,
    >
    > A table on my DB2 database has encrypted data, and I wish to extract
    > it. I have written the DBI code to connect to the database, and read
    > all values from the column I want. However, I am not sure if the data
    > that the perl script retrieves from the database is the "correct"
    > encrypted data. I know that DB2 has its own format for storing
    > encrypted data, but do not know how to process this data (using a pack
    > or unpack?)
    >
    >
    > When I run a select on the table from a db2 prompt, a row in the table
    > looks like as:
    >
    > 1 x'D6B6D2EE0C57ADF2'
    >
    > What transformation do I need to apply to the binary data stored in a
    > perl scalar variable to make sure that I am working with the right
    > encrypted data?
    >
    > Thanks a lot..


    There are hundreds of encryption algorithms. How are we supposed to work out
    what you used?

    Perl has modules for common symmetric encryption like DES & RC4.

    gtoomey
    Gregory Toomey, Dec 10, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tony
    Replies:
    1
    Views:
    563
    Murray
    Aug 2, 2004
  2. Replies:
    4
    Views:
    6,889
    Chris
    Feb 6, 2005
  3. Replies:
    0
    Views:
    7,582
  4. Dinesh
    Replies:
    0
    Views:
    153
    Dinesh
    Apr 3, 2006
  5. Replies:
    0
    Views:
    172
Loading...

Share This Page