Пример #1
0
 public static byte[] FromBase64Url(this string base64Url)
 {
     return(Base64UrlEncoder.DecodeBytes(base64Url));
 }
Пример #2
0
 /// <summary>
 /// Guid转换为url友好的Base64
 /// </summary>
 /// <param name="guid"></param>
 /// <returns></returns>
 public static string ToBase64Url(Guid guid)
 {
     return(Base64UrlEncoder.Encode(guid.ToByteArray()));
 }
Пример #3
0
 public static string ToBase64Url(this byte[] bytes)
 {
     return(Base64UrlEncoder.EncodeBytes(bytes));
 }