public function registerKeyPairFromPrivateKeyString($privateKeyString, $usedForPasswords = false)
    {
        $keyResource = openssl_pkey_get_private($privateKeyString);

        $modulus = $this->getModulus($keyResource);
        $publicKeyString = $this->getPublicKeyString($keyResource);

        $privateKey = new OpenSslRsaKey($modulus, $privateKeyString);
        $publicKey = new OpenSslRsaKey($modulus, $publicKeyString);

        return $this->storeKeyPair($publicKey, $privateKey, $usedForPasswords);
    }