functions-online

Cryptography

Execute and test PHP functions with a cryptographic background.

convert_uudecode

convert_uudecode() decodes a uuencoded string.

convert_uuencode

convert_uuencode() encodes a string using the uuencode algorithm.

Uuencode translates all strings (including binary's ones) into printable characters, making them safe for network transmissions. Uuencoded data is about 35% larger than the original.

crc32

Generates the cyclic redundancy checksum polynomial of 32-bit lengths of the $str. This is usually used to validate the integrity of data being transmitted.

Because PHP's integer type is signed, and many crc32 checksums will result in negative integers, you need to use the "%u" formatter of sprintf() or printf() to get the string representation of the unsigned crc32 checksum.

crypt

crypt() will return an encrypted string using the standard Unix DES-based encryption algorithm or alternative algorithms that may be available on the system.

If no Salt-Argument is given, PHP randomly generates a new one with every use of the function.

To generate a .htpasswd password, simple copy your password in $str and click on "run". The parameter $salt must not be filled. Now copy the generated password in your .htpasswd file with a : as separator to the username in a new line (username:password).

Generate Password

Generate your own password with several options. The number of characters is free adjustable as the used characters, too.

hash

hash() generates a hash value (message digest)

md5

Calculates the MD5 hash of $str using the « RSA Data Security, Inc. MD5 Message-Digest Algorithm » and returns that hash. The MD5 code returns always a string of 32 characters. Every char is given as the hexadecimal equivalent of the calculated MD5 value.

mhash

mhash() applies a hash function specified by $hash to the $data.

sha1

Calculates the sha1 hash of $str using the « US Secure Hash Algorithm 1 ».