encryption - MySQL ENCRYPT field to MD5 -


i having trouble transfer email user account saved in mysql server. here detail:

i have old email server using mysql store user account information. password field uses mysql encrypt function save users password. if want change user's password can do:

 update  `mail`.`users` set  `password` = encrypt(  '12345' ) convert(  `users`.`email` using utf8 ) =  'g@veecall.com' limit 1 ; 

then new password "12345" saved in table string of " 2i6joeg.jukj."

now build new server using iredmail. when try transfer user account have trouble transfer password field. because iradmail/dovecot using md5-cram encrypt password save in mysql. password string started "$1$".

so, there way make mysql encrypted password string "2i6joeg.jukj." convert md5 hash "$1$................."?

thanks help.

firstly md5 hashing algorithm not encryption algorithm. main reason is virtually impossible calculate original password hash value generated md5. md5 creates hash value , trap door function in other words 1 way function.

encryption allow encrypt , decrypt if knew key. big difference. hope understand that.

now problem.

unless have original password before encrypted there no reasonable way besides brute force create md5 equivalent of password. encrypted passwords hash , unecrypted/plain text password hash 2 different think.

if can decrypt passwords have plain text form can perform md5 hashing on plain text values. if cannot original plain text out of luck.


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -