Re: splitting text that contains an encrypted value
- From: shawnhcorey@xxxxxxxx (Mr. Shawn H. Corey)
- Date: Fri, 28 Apr 2006 15:18:02 -0400
On Fri, 2006-28-04 at 14:16 -0500, Rance Hall wrote:
here is the prelim setup:
my $delimiter = ";;;";
my $teststring = "name;;;encryptedpassword;;;date";
my @userdetails = split($delimiter, $teststring);
here is the goal:
I would like to find a delimiter value that I can use to both create and
read from a flat-file database where splitting on the $delimiter doesn't
improperly split either the encryptedpassword value, or a reasonable
date format.
Question:
What would a good value for $delimiter be?
The only way to guarantee that your delimiter won't be part of the data
is to make it longer than any possible field. That way, it would be
impossible for your encryption algorithm to accidentally create it.
--
__END__
Just my 0.00000002 million dollars worth,
--- Shawn
"For the things we have to learn before we can do them, we learn by doing them."
Aristotle
* Perl tutorials at http://perlmonks.org/?node=Tutorials
* A searchable perldoc is at http://perldoc.perl.org/
.
- References:
- splitting text that contains an encrypted value
- From: Rance Hall
- splitting text that contains an encrypted value
- Prev by Date: splitting text that contains an encrypted value
- Next by Date: Re: splitting text that contains an encrypted value
- Previous by thread: splitting text that contains an encrypted value
- Next by thread: Re: splitting text that contains an encrypted value
- Index(es):
Relevant Pages
|