List of utility methods to do Base64 Encode
String | convertToBase64(byte[] in) convert To Base if (in == null) return null; return new String(Base64.encode(in, Base64.URL_SAFE | Base64.NO_PADDING), "UTF8"); |
long | base64StringKeyId2Long(String keyId) base String Key Id Long try { return ByteBuffer.wrap( Base64.decode(keyId.getBytes("UTF-8"), Base64.NO_WRAP)) .getLong(); } catch (IllegalArgumentException e) { e.printStackTrace(); return 0; } catch (UnsupportedEncodingException e) { ... |