public KeyData GetPublicKey(Uri requestUri, string keyName)
        {
            requestUri.ThrowIfNull(nameof(requestUri));
            keyName.ThrowIfNull(nameof(keyName));

            var key       = keyStore.GetActiveKey(keyName);
            var publicKey = key.Key.GetPublicKey();

            publicKey.KeyId     = requestUri.GetLeftPart(UriPartial.Path) + "/" + key.KeyId;
            publicKey.KeyType   = key.KeyType;
            publicKey.Algorithm = key.SupportedAlgorithm;
            PublicKeyCache cache = null;

            if (key.ExpirationTimeInDays.HasValue)
            {
                cache = new PublicKeyCache(
                    DateTime.UtcNow.AddDays(
                        key.ExpirationTimeInDays.Value).ToString("yyyy-MM-ddTHH:mm:ss", sg.CultureInfo.InvariantCulture));
            }

            return(new KeyData(publicKey, cache));
        }