Пример #1
0
 /// <summary>
 /// 将通过Base64加密的字符串转换成对象
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="str"></param>
 /// <returns></returns>
 public static T DecryptBase64<T>(string str) where T : class
 {
     if (string.IsNullOrEmpty(str)) return default(T);
     byte[] bytes = Convert.FromBase64String(str);
     T t = SerializerHelper.ConvertToObject<T>(bytes);
     return t;
 }