src/KeyStore.php
public function add($user, \fpoirotte\Pssht\PublicKeyInterface $key)
    {
        if (!is_string($user)) {
            throw new \InvalidArgumentException();
        }

        $this->keys[$user][$this->getIdentifier($key)] = $key;
    }
public function add($user, \fpoirotte\Pssht\PublicKeyInterface $key)
    {
        if (!is_string($user)) {
            throw new \InvalidArgumentException();
        }

        $this->keys[$user][$this->getIdentifier($key)] = $key;
    }
public function add ( $ user , \ fpoirotte \ Pssht \ PublicKeyInterface $ key ) { if ( ! is_string ( $ user ) ) { throw new \ InvalidArgumentException ( ) ; } $ this -> keys [ $ user ] [ $ this -> getIdentifier ( $ key ) ] = $ key ; }
Add a new key in the store.

\param string $user
User the key belongs to.

\param fpoirotte::Pssht::PublicKeyInterface $key
Public/private key to add.
Add a new key in the store .