CreateUrlEncodedBase64 Method
Definition
CreateUrlEncodedBase64(byte[])
Creates a URL-safe Base64 string representation of the specified byte array.
public static string CreateUrlEncodedBase64(byte[] value)
Parameters
valuebyte[]The byte array to convert.
Returns
- string
A URL-safe Base64 string representation of
value.
Remarks
This method uses the Base64 URL encoding convention by removing padding characters and replacing
+ with - and / with _.
The implementation was inspired by Appendix C of the JSON Web Signature (JWS) draft specification.
Exceptions
- ArgumentNullException
valueis null.