Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Let me get this straight...

You have a byte string, your plaintext, it being (as hex bytes) 38-32-33-35, or (as ASCII chars) '8235'.

You send it to your encryption server, and you get back a byte string, your cyphertext, it being (as base64) 'vY+TqCu5/Wdg6O+ilDqHVQ==', or (as hex bytes) bd-8f-93-a8-2b-b9-fd-67-60-e8-ef-a2-94-3a-87-55.

Then you have something in a field in a database, that should be the same cyphertext, stored as hex digits in a CHAR column. The value you have is (as hex digits) 63-9D-87-9F-22-4C-A2-A1-BA-73-CC-48-84-DB-D3-62.

It is not the same value as the one corresponding to the base64-encoded string you posted. Are you sure you are reading from the correct row in the table? Otherwise I missed some steps in your process.

-- 
        dakkar - Mobilis in mobile

Most of my code is tested...

Perl is strongly typed, it just has very few types (Dan)


In reply to Re^7: convert hexadecimal value to encrypted string by dakkar
in thread convert hexadecimal value to encrypted string by linuxfan

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2024-04-18 22:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found