MagicEnvelope object orientation (no passing arrays)

MagicEnvelope now uses object properties instead of passing arrays
around everywhere.
This commit is contained in:
Mikael Nordfeldth
2014-05-27 11:32:12 +02:00
parent 14251d26ad
commit 41773d3f67
6 changed files with 136 additions and 161 deletions

View File

@@ -279,6 +279,9 @@ class Magicsig extends Managed_DataObject
public function sign($bytes)
{
$sig = $this->privateKey->sign($bytes);
if ($sig === false) {
throw new ServerException('Could not sign data');
}
return Magicsig::base64_url_encode($sig);
}