예제 #1
0
        private T Decrypt <T>(byte[] cipherBytes)
        {
            var value = _cryptographyService.DecryptCipherBytes(cipherBytes);

            if (value == null)
            {
                return(default(T));
            }

            var converter = TypeDescriptor.GetConverter(typeof(T));

            return((T)converter.ConvertFromInvariantString(value));
        }