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