change function name
This commit is contained in:
parent
59e34122b7
commit
21edb98a32
@ -57,7 +57,6 @@ class Magicsig extends Memcached_DataObject
|
||||
return $obj;
|
||||
}
|
||||
|
||||
|
||||
function table()
|
||||
{
|
||||
return array(
|
||||
@ -77,7 +76,6 @@ class Magicsig extends Memcached_DataObject
|
||||
64, false));
|
||||
}
|
||||
|
||||
|
||||
function keys()
|
||||
{
|
||||
return array_keys($this->keyTypes());
|
||||
@ -114,7 +112,6 @@ class Magicsig extends Memcached_DataObject
|
||||
$this->insert();
|
||||
}
|
||||
|
||||
|
||||
public function toString($full_pair = true)
|
||||
{
|
||||
$public_key = $this->_rsa->_public_key;
|
||||
@ -188,7 +185,7 @@ class Magicsig extends Memcached_DataObject
|
||||
|
||||
public function sign($bytes)
|
||||
{
|
||||
$sig = $this->_rsa->createSign($bytes, null, 'sha256');
|
||||
$sig = $this->_rsa->createSign($bytes, null, 'magicsig_sha256');
|
||||
if ($this->_rsa->isError()) {
|
||||
$error = $this->_rsa->getLastError();
|
||||
common_log(LOG_DEBUG, 'RSA Error: '. $error->getMessage());
|
||||
@ -200,7 +197,7 @@ class Magicsig extends Memcached_DataObject
|
||||
|
||||
public function verify($signed_bytes, $signature)
|
||||
{
|
||||
$result = $this->_rsa->validateSign($signed_bytes, $signature, null, 'sha256');
|
||||
$result = $this->_rsa->validateSign($signed_bytes, $signature, null, 'magicsig_sha256');
|
||||
if ($this->_rsa->isError()) {
|
||||
$error = $this->keypair->getLastError();
|
||||
common_log(LOG_DEBUG, 'RSA Error: '. $error->getMessage());
|
||||
@ -213,7 +210,7 @@ class Magicsig extends Memcached_DataObject
|
||||
|
||||
// Define a sha256 function for hashing
|
||||
// (Crypt_RSA should really be updated to use hash() )
|
||||
function sha256($bytes)
|
||||
function magicsig_sha256($bytes)
|
||||
{
|
||||
return hash('sha256', $bytes);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user