-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathIdentityKey.php
More file actions
51 lines (51 loc) · 1.5 KB
/
Copy pathIdentityKey.php
File metadata and controls
51 lines (51 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
require_once("ecc/Curve.php");
require_once("ecc/ECPublicKey.php");
require_once("util/Hex.php");
class IdentityKey {
protected $publicKey; // ECPublicKey
private function __init() { // default class members
}
public static function __staticinit() { // static class members
}
public static function constructor__de8cd838 ($publicKey) // [ECPublicKey publicKey]
{
$me = new self();
$me->__init();
$me->publicKey = $publicKey;
return $me;
}
public static function constructor__29e7cc9a ($bytes, $offset) // [byte[] bytes, int offset]
{
$me = new self();
$me->__init();
$me->publicKey = Curve::decodePoint($bytes, $offset);
return $me;
}
public function getPublicKey ()
{
return $this->publicKey;
}
public function serialize ()
{
return $this->publicKey->serialize();
}
public function getFingerprint ()
{
/* match: ae1a4a6a */
return Hex::toString_ae1a4a6a($this->publicKey->serialize());
}
public function equals ($other) // [Object other]
{
if (($other == null))
return FALSE ;
if (!($other instanceof IdentityKey))
return FALSE ;
return $this->publicKey->equals(call_user_func(array($other,'getPublicKey')));
}
public function hashCode ()
{
return $this->publicKey->hashCode();
}
}
IdentityKey::__staticinit(); // initialize static vars for this class on load