|
Posted by Gordon Burditt on 02/24/06 07:47
>I've just started playing with mcrypt for encryption but not sure if
>I'll need to write my own. Basically I don't need anything advanced
>for protection but want to mask the data so it's not easily
>deciphered....BUT, I need the encrypted data to be something that can
>be used as an email address (the user portion of the address, not
>domain). So it needs to only output standard ascii characters I can
>use there.
>
>Is there an easy way to get mcrypt or another built in function to do
>this? If not, I have ways of building my own but would love to use
>something prebuilt.
Usually, you encrypt to raw binary, then encode with something
appropriate for the target alphabet you want, like base64_encode(),
bin2hex(), convert_uuencode(), etc. To decrypt, reverse the
encoding, then reverse the encryption.
Gordon L. Burditt
[Back to original message]
|