In a dynamic GC-based system, the bits forming the cc number could indeed hang around much longer than the variable itself, and even get swapped to disk. A program that gained read-only access to memory or swapfile could scan for sequences that look like cc numbers and have a valid checksum, and might get lucky.
Obviously, storing it in more obfuscated form isn't quite enough, if it will be decoded before use. To make it work, you must not fully decode it! But, what are you doing with the number? You send it out the file handle one digit at a time. So, you could programmatically extract the first digit and send it, then the second and send it, etc. and never have the full thing stored in a Perl variable (socket buffers and such are another story, and a more general problem).
So, you could store the digits in an array or hash instead of a scalar string, and then it will already be scrambled when the memory is released, and not findable using the simple method discussed above.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.