public static byte[] FromBase64Url(this string base64Url) { return(Base64UrlEncoder.DecodeBytes(base64Url)); }
/// <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)); }