private String base64Encode ( String value ) { byte [ ] encodedCookieBytes = Base64 . getEncoder ( ) . encode ( value . getBytes ( ) ) ; return new String ( encodedCookieBytes ) ; }
Encode the value using Base64 .