Re: encrypt/decrypt string
by samtregar (Abbot) on Oct 19, 2006 at 17:56 UTC
|
There are many encryption modules avaialble on CPAN. I usually reach for Crypt::Blowfish, which is best used via Crypt::CBC. It's a fast algorithm which hasn't been broken yet, as far as I know.
-sam
| [reply] |
|
|
Thanks, It works for me finally. I wanted to pass the hex character instead of random ascii characters. encrypt_hex and decrypt_hex did the job.
| [reply] |
|
|
I like to have fix number of characters (for example: 20 Hex digits) in the encrypted string.
| [reply] |
|
|
That strikes me as a silly thing to want in this context. There's no reason URLs need to be a fixed length and trust me, Blowfish isn't any weaker for producing variable length output.
-sam
| [reply] |
|
|
Blowfish *does* encrypts a fixed number of input characters to a fixed number of output characters.
| [reply] |
Re: encrypt/decrypt string
by kwaping (Priest) on Oct 19, 2006 at 18:43 UTC
|
| [reply] |
Re: encrypt/decrypt string
by davido (Cardinal) on Oct 19, 2006 at 17:57 UTC
|
What are you trying to accomplish by passing the encrypted strings in the URL? Is this for session management? Login info?
I think there may be some good strategies out there, but need more information. I'm not so much interested in how you want to implement the encryption. I'm asking what it's for.
| [reply] |
|
|
I am passing the login info and like to publish RSS feed for given user. I like to have fix number of characters in the encrypted string.
| [reply] |
|
|
I thought you might be passing login info. Once the client has logged in, you don't need to pass the info back and forth anymore; just pass an encrypted session ID, and store any other sensitive info on the server. You would probably benefit from CGI::Session, and one of its session ID helper modules such as CGI::Session::ID::MD5 (which uses Digest::MD5).
| [reply] |
|
|
|
|
|
Re: encrypt/decrypt string
by ikegami (Patriarch) on Oct 19, 2006 at 19:18 UTC
|
GUIDs are neither encrypted nor one-way.
| [reply] |