- sha1: documentation ( source)
- trim: documentation ( source)
- strtolower: documentation ( source)
- printf: documentation ( source)
- md5: documentation ( source)
<?php
$emails = array("tcely", "cely@iqnection.com", "cely@tenable.com", "Chris.Ely@gmail.com", "tcely@users.noreply.github.com");
$gh_hash = 'e1072495bf07d013ec5de9f90ad6530d';
printf("github hash (len: %d): %s\n", strlen($gh_hash), $gh_hash);
foreach ($emails as $k => $email) {
$md5 = md5( strtolower( trim( $email ) ) );
$sha1 = sha1( strtolower( trim( $email ) ) );
printf('email: %-30s'."=>\n", $email);
printf("\t".'https://identicons.github.com/%s.png'."\n", $md5);
printf("\t".'https://identicons.github.com/%s.png'."\n", $sha1);
}