protected function Bakery::bakeData in Bakery Single Sign-On System 7.3
Serialze, sign and encode data for secure transport.
Parameters
array $data Raw data to encrypt.:
Return value
string Base 64 encoded signed and encrypted data.
2 calls to Bakery::bakeData()
- Bakery::setSsoCookie in ./
bakery.inc - Create SSO cookie for account.
- Bakery::setSubCookie in ./
bakery.inc - Create cookie used during sub-site registration.
File
- ./
bakery.inc, line 224
Class
Code
protected function bakeData(array $data) {
$this
->debug('bake ' . $data['type'], $data);
$data = $this
->serialize($data);
$encrypted_data = $this
->encrypt($data);
$signature = $this
->sign($encrypted_data);
return base64_encode($signature . $encrypted_data);
}