> I'm trying to take a string ( In this case, a password ), and encrypt it > with RSA encryption via the perl module, Crypt::RSA. Later on, I want > to be able to pull the encrypted string back out and decrypt it. > > One of three things happens when I do this however. > > 1) Everything works fine. > 2) I cannot insert the encrypted string. > 3) The encrypted string is inserted, but incorrectly and will not > decrypt. > > I tried using a blob or medium blob for the datatype, but neither will > work 100% of the time. Has anyone done this before with a Mysql db and > if so, how? What sort of datatype do you use for the field that will > contain the encrypted string? Did you use a different type of > encryption method? ( Keep in mind that I cannot use a one way encryption > scheme for this. )
Store it as a blob if you don't want to mess with it. or if it's easier you can use Mime::Base64 encode it and store it as text. Then decode it when you need it. NOTE: encoding it will make it a bigger. -Lance --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php