You are here

function sharethis_create_publisher_key in ShareThis 7.2

Same name and namespace in other branches
  1. 8.2 sharethis.install \sharethis_create_publisher_key()

Creates a publisher key for use with the ShareThis API.

1 call to sharethis_create_publisher_key()
sharethis_install in ./sharethis.install
Implements hook_install().

File

./sharethis.install, line 18
This file holds the install information for the ShareThis Module.

Code

function sharethis_create_publisher_key() {
  $pubkey = "dr-";
  $pubkey .= dechex(mt_rand(0, 0xffff));
  $pubkey .= dechex(mt_rand(0, 0xffff)) . "-";
  $pubkey .= dechex(mt_rand(0, 0xffff)) . "-";
  $pubkey .= dechex(mt_rand(0, 0xffff)) . "-";
  $pubkey .= dechex(mt_rand(0, 0xffff)) . "-";
  $pubkey .= dechex(mt_rand(0, 0xffff));
  $pubkey .= dechex(mt_rand(0, 0xffff));
  $pubkey .= dechex(mt_rand(0, 0xffff));
  return $pubkey;
}