@Override
    public Cipher toCipher() {
        return Unchecked.supplier(() -> {
            if (StringUtils.isNotBlank(location)) {
                LOGGER.trace("Attempting to initialize the cipher for public key [{}]", location);
                return initializePublicKeyFactoryBean().toCipher();
            }
            LOGGER.warn("NO public key location is defined");
            return null;
        }).get();
    }
Represents a public key for a CAS registered service.

@author Misagh Moayyed
@since 4.1
core/cas-server-core-services-api/src/main/java/org/apereo/cas/services/RegisteredServicePublicKeyImpl.java