@Override
    protected Key engineTranslateKey(Key key) throws InvalidKeyException {
        if (key == null) {
            throw new InvalidKeyException("key == null");
        }
        if ((key instanceof OpenSslSlhDsaPublicKey) || (key instanceof OpenSslSlhDsaPrivateKey)) {
            return key;
        }
        throw new InvalidKeyException(
                "Key must be OpenSslSlhDsaPublicKey or OpenSslSlhDsaPrivateKey");
    }
An implementation of a {@link KeyFactorySpi} for SLH-DSL keys based on BoringSSL.
common/src/main/java/org/conscrypt/OpenSslSlhDsaKeyFactory.java