public void CreateSignature_WithEmptySessionValue()
        {
            string signature = "";

            // Act
            signature = signatureHelper.CreateSignature(null);

            // Assert
            Assert.Empty(signature);
        }
        public async Task SetAsync(string key, byte[] value, DistributedCacheEntryOptions options, CancellationToken token = default)
        {
            if (value == null || value.Length == 0)
            {
                await _cache.SetAsync(key, value, options, token);

                return;
            }

            var signature          = _signatureHelper.CreateSignature(value);
            var encodedActualValue = Convert.ToBase64String(value);
            var signedValue        = Encoding.UTF8.GetBytes(encodedActualValue + "." + signature);
            await _cache.SetAsync(key, signedValue, options, token);
        }