/** * Encode the serialized form generated by toBytes() in Base64, used as the JSON serialization format. * * @return Base64 serialization */ @JsonValue public String toBase64() { byte[] asBytes = toBytes(); return StringUtils.fromUtf8(StringUtils.encodeBase64(asBytes)); }
/** * Convert an input to base 64 and return the utf8 string of that byte array * * @param input The string to convert to base64 * @return the base64 of the input in string form */ public static String utf8Base64(String input) { return fromUtf8(encodeBase64(toUtf8(input))); }
gssContext.dispose(); return new String(StringUtils.encodeBase64(outToken), StandardCharsets.US_ASCII);