SHARE
TWEET

Untitled

a guest Mar 25th, 2019 47 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import org.apache.commons.codec.binary.Base64;
  2.  
  3. // Encode data on your side using BASE64
  4. byte[] bytesEncoded = Base64.encodeBase64(str.getBytes());
  5. System.out.println("encoded value is " + new String(bytesEncoded));
  6.  
  7. // Decode data on other side, by processing encoded data
  8. byte[] valueDecoded = Base64.decodeBase64(bytesEncoded);
  9. System.out.println("Decoded value is " + new String(valueDecoded));
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top