public static String bytesToBase64Url ( byte [ ] bytes ) { String result = ( new String ( Base64 . encodeBase64 ( bytes ) , MESSAGE_ENCODING ) ) . replace ( "=" , "" ) . replace ( "\\" , "" ) . replace ( ' ' , ' ' ) . replace ( ' ' , ' ' ) ; return result ; }
Convert bytes array to Base64Url string .