Don't click here unless you want to be banned.

LSL Wiki : llMD5String

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are
string llMD5String(string src, integer nonce)

Performs a RSA Data Security, Inc. MD5 Message-Digest Algorithm on string with nonce (also known as salt). Returns a 32-character hex string. (128-bit in binary.)

The actual string used for calculating the MD5 checksum is src + ":" + (string)nonce. Take note of this if you need to check your MD5 hash outside of SL, such as within a server-side script!

llSay(0, llMD5String("Hello, Avatar!", 0)); // returns 112abd47ceaae1c05a826828650434a6

Same string on a completely different system returns the same checksum (when used with the same nonce):
$ echo -n 'Hello, Avatar!:0' | openssl md5
Example usage, with php:
$nonce = 0;
encoded = md5('Hello, Avatar!'.':'.$nonce);
echo encoded;

Q & A

Q: Wait, isn't 32 hex characters 512 bits in binary? (32 * 16 = 512)
A: No, because hex is Base 16, and binary Base 2, meaning a hex character is 4 bits. (See the hexadecimal entry.)

Q: What the hell's a "nonce"?
A: In computer security, a "nonce" is a 'number used once'. It is often a random or pseudo-random number issued in an authentication protocol to ensure that old communications cannot be reused in 'repeat attacks'. So if you wanted to have two scripts talking to each other with secure communications, you might want to consider doing something with llFrand (don't use something easily predictable like the time).
Coincidentally, "nonce" is also a good old word that means 'right now' or 'temporarily', as in, "Are we seriously going to hold it together with duct tape and bubble gum?" "For the nonce!" The etymology of the computer security term is unrelated.

Q: What encoding is used?
A: The result is the MD5 hash of the UTF-8 encoded form of the string.

Q: What happens if UTF-16 characters are passed to it?
A: UTF-16 is an encoding, not a type of character. The elements of LSL strings are Unicode characters. When passed to this call (and also presumable to the base64 encoding calls), the characters are encoded as UTF-8. UTF-8 can represent all Unicode characters. For example the INFINITY symbol is Unicode code point U+221E and is encoded in UTF-8 as the three byte sequence 0xE2 0x88 0x9E.

Q: How do you make "nonce" match PHP's md5(); feature?
A: You don't, but you can use the function found here to emulate it.

This article wasn't helpful for you? Maybe the related article at the LSL Portal is able to bring enlightenment.

Functions | Communications | Crypto | MD5 Jasa SEO Jasa SEO Murah Sepatu Online Toko Sepatu Online Sepatu Sepatu Murah Sepatu Safety Sepatu Futsal Cheapes Hostgator Coupon Link Booking Televisori offerte Notebook Offerte Berita Terkini Internet Marketer Muda Internet Marketer Indonesia Portatile Apple RDAnet Lorks Karikatur Bisnis Modal Kecil Bisnis UKM Berita Terbaru Iklan Baris Jasa SEO Jasa SEO Murah SEO Indonesia Konsultan SEO SEO Belajar SEO Kursus SEO Kursus SEO Murah Jam Tangan Casio Jam Tangan Casio Jam Tangan Murah Jam Tangan Grosir Baju Terbaru Grosir Baju Baju Terbaru Grosir Baju Murah Bisnis Online Belajar SEO Kerupuk Kerupuk kulit Social Bookmark Dofollow Social Bookmark Kumpulan Puisi Kirim Puisi bola hantu Penumbuh Rambut Penumbuh Rambut timbangan WBC Wonogiri Jasa SEO Murah Jasa SEO Jam Tangan Murah
There are 4 comments on this page. [Display comments/form]