You are here

function bakery_bake_data in Bakery Single Sign-On System 6.2

Same name and namespace in other branches
  1. 7.4 bakery.module \bakery_bake_data()
  2. 7.2 bakery.module \bakery_bake_data()

Encrypt and sign data for Bakery transfer.

Parameters

Array of data to be transferred.:

Return value

String of signed and encrypted data, url safe.

6 calls to bakery_bake_data()
bakery_bake_oatmeal_cookie in ./bakery.module
Create a cookie for passing information between sites for registration and login.
bakery_eat_gingerbread_cookie in ./bakery.module
Respond with account information.
bakery_request_account in ./bakery.module
Request account information from master to create account locally.
bakery_user in ./bakery.module
Implementation of hook_user().
_bakery_bake_chocolatechip_cookie in ./bakery.module
Create a new cookie for identification

... See full list

File

./bakery.module, line 892

Code

function bakery_bake_data($data) {
  $key = variable_get('bakery_key', '');
  $data = bakery_encrypt(serialize($data));
  $signature = hash_hmac('sha256', $data, $key);
  return base64_encode($signature . $data);
}