27 $this->keys = array();
41 $encoder = new \fpoirotte\Pssht\Wire\Encoder();
42 $key->serialize($encoder);
43 return $encoder->getBuffer()->get(0);
57 if (!is_string($user)) {
58 throw new \InvalidArgumentException();
75 if (!is_string($user)) {
76 throw new \InvalidArgumentException();
92 public function get($user)
94 if (!is_string($user)) {
95 throw new \InvalidArgumentException();
98 if (!isset($this->keys[$user])) {
99 return new \ArrayIterator();
102 return new \ArrayIterator($this->keys[$user]);
121 if (!is_string($user)) {
122 throw new \InvalidArgumentException();
125 if ($key instanceof \
fpoirotte\Pssht\Key\KeyInterface) {
128 if (!is_string($key)) {
129 throw new \InvalidArgumentException();
132 return isset($this->keys[$user][$key]);
147 if (!is_string($user)) {
148 throw new \InvalidArgumentException();
151 if (!isset($this->keys[$user])) {
155 return count($this->keys[$user]);
$keys
Public/private keys currently stored.
getIdentifier(\fpoirotte\Pssht\Key\KeyInterface $key)
add($user,\fpoirotte\Pssht\Key\KeyInterface $key)