public static function WSSE($nonce = '', $timestamp = '')
{
$wsse = array();
if (is_array($nonce)) {
$wsse = $nonce;
$nonce = '';
}
if ('' === $nonce) {
$nonce = Utils::crypt(Options::get('public-GUID') . Utils::nonce());
}
if ('' === $timestamp) {
$timestamp = date('c');
}
$user = User::identify();
$wsse = array_merge($wsse, array('nonce' => $nonce, 'timestamp' => $timestamp, 'digest' => base64_encode(pack('H*', sha1($nonce . $timestamp . $user->password)))));
return $wsse;
}