You are here

function _referral_asc2hex in User Referral 7

Same name and namespace in other branches
  1. 5 referral.module \_referral_asc2hex()
  2. 6 referral.module \_referral_asc2hex()

Helper function for _referral_ref2uid() and _referral_uid2ref()

1 call to _referral_asc2hex()
_referral_hex_seed in ./referral.module
Helper function for _referral_ref2uid() and _referral_uid2ref()

File

./referral.module, line 800
The referral module.

Code

function _referral_asc2hex($asc_str) {
  $hex_str = '';
  for ($i = 0; $i < strlen($asc_str); $i++) {
    $hex_str .= sprintf("%02x", ord(substr($asc_str, $i, 1)));
  }
  return $hex_str;
}