Archive - Jan 9, 2007

Date

MicroID

MicroID is a new kind of identification system started this year. According to it's specification, it is a lightweight identity technology come from hash any two Uniform Resource Identifiers. The returned format like this
uri_name+uri_name:hash_algorithm:hashed_result
Here is an PHP code example of how to make a MicroID

function micro_id_sha1($uri1, $uri1_var, $uri2, $uri2_var){
    return $uri1.'+'.$uri2.':sha1:'.sha1(sha1($uri1_var).sha1($uri2_var));
}
echo micro_id_sha1('mailto','mgcclx@gmail.com','http','/');

Result:
mailto+http:sha1:eaee97ea206efb9b918f907617932451b50a5a14

Important, the order of your URI does matter, it will change the hash, if the above example change to this:

echo micro_id_sha1('http','/','mailto','mgcclx@gmail.com');

Result:
http+mailto:sha1:da7ea3a1bccf5d29a51bd44b5d66d6d52dcb2e7b

Honey Pot that kill bots