function _openid_create_message

Create a serialized message packet as per spec: $key:$value\n .

4 calls to _openid_create_message()

File

drupal/core/modules/openid/openid.inc, line 318
OpenID utility functions.

Code

function _openid_create_message($data) {
  $serialized = '';
  foreach ($data as $key => $value) {
    if (strpos($key, ':') !== FALSE || strpos($key, "\n") !== FALSE || strpos($value, "\n") !== FALSE) {
      return NULL;
    }
    $serialized .= "{$key}:{$value}\n";
  }
  return $serialized;
}