Hello guys I wanna make a registration page for a game which uses SQL DB
does anyone know how to encrypt a pass so that it ends up like this?

0x7BF1EA5EBADD9D7DD2D43E25ABEBCD100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

btw the column that the pass is sored in is BINARY

that converts into "999momo999" i think its md5 with a bunch of zeros added?
and also each user has a unique ID liekt his one

0BA9CF75-CA4F-4598-9B80-0C847A54FC00

how could i generate a random one for each user note each block has to be diffrent

thanks in advance Phi7iP,

i don't know why you want so many zeroes. But if all you want is to encrypt password then you may use md5 and salts. With a unique salt for each user.
If md5/salt is new to you, you should check out this http://php.net/manual/en/function.md5.php

for random id's you may try generating random numbers and then slicing/concatenating them to appropriate length. But of course there might be better way and your best bet is PHP manual (infact it always is the best place to go).
Vinayak

i didn't code the game so i have to make what it needs
just checked its not md5 coz md5 or "999momo999" is

1f3870be274f6c49b3e31a0c6728957f

any ideas what they could have used?

solved second part with this code

<?php
$rand_str = strtoupper(md5(rand(0, 99999999999999)));
$tmp.=substr($rand_str, 0, 8).'-'; 
$tmp2.=substr($rand_str, 8, 4).'-';
$tmp3.=substr($rand_str, 12, 4).'-'; 
$tmp4.=substr($rand_str, 16, 4).'-'; 
$tmp5.=substr($rand_str, 20, 32); 
echo $tmp, $tmp2, $tmp3, $tmp4, $tmp5;
?>

now just the password anyone? still cant find out what kind of encryption that is

sorry cant find where to edit posts

just found the pattern of the pass
its only the 32 chars that change the ammnt of zeros and the 0x stays the same
any idea what could be generating the 32 chars?

0x 32chars 88 zeros

"999momo999" converts into 0x + "7BF1EA5EBADD9D7DD2D43E25ABEBCD10" + 88 zeros

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.