Lines Matching refs:key

329     function sharedapi_encrypt($key, $data) {  argument
330 $key = sharedapi_get_valid_key($key);
331 …return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $data, MCRYPT_MODE_ECB, mcrypt…
334 function sharedapi_decrypt($key, $data) { argument
335 $key = sharedapi_get_valid_key($key);
336 …return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, base64_decode($data), MCRYPT_MODE_ECB, mcryp…
339 function sharedapi_encode_data($key, $json) { argument
341 return sharedapi_encrypt($key, $data);
344 function sharedapi_decode_data($key, $data) { argument
345 $data = sharedapi_decrypt($key, $data);
353 function sharedapi_get_valid_key($key) { argument
357 if (in_array(strlen($key), $accepted_length)) {
358 return $key;
363 if (strlen($key) < $length) {
364 return str_pad($key, $length, "\0");
369 if (strlen($key) > end($accepted_length)) {
370 return substr($key, 0, end($accepted_length));
404 function sharedapi_accept_data($key, $data = '', $is_response = false) { argument
416 $json = $is_response ? json_decode($data, true) : sharedapi_decode_data($key, $data);
421 …$json[SHAREDAPI_EVENT_FIELD_DATA] = sharedapi_decode_data($key, $json[SHAREDAPI_EVENT_FIELD_DATA]);
429 function sharedapi_build_data_item($key, $data) { argument
430 return array(SHAREDAPI_EVENT_FIELD_DATA => sharedapi_encode_data($key, $data));
433 …dapi_build_response($product, $version, $vbsso_version, $data = null, $error = null, $key = null) { argument
446 if ($key) {
447 $data = sharedapi_encrypt($key, $data);
510 foreach ($data as $key => $value) {
511 $output .= $key . '=' . $value . '&';