/** * Encodes a byte array into Base64 notation. Does not GZip-compress data. * * @param source The data to convert * @param off Offset in array where conversion should begin * @param len Length of data to convert * @return the text node * @since 1.4 */ public static String encodeBytes(byte[] source, int off, int len) { return encodeBytes(source, off, len, NO_OPTIONS); } // end encodeBytes
/** * Encodes a byte array into Base64 notation. * Does not GZip-compress data. * * @param source The data to convert * @return the encode bytes * @since 1.4 */ public static String encodeBytes(byte[] source) { return encodeBytes(source, 0, source.length, NO_OPTIONS); } // end encodeBytes
/** * Encodes a byte array into Base64 notation. * Does not GZip-compress data. * * @param source The data to convert * @return the encode bytes * @since 1.4 */ public static String encodeBytes(byte[] source) { return encodeBytes(source, 0, source.length, NO_OPTIONS); } // end encodeBytes
/** * Encodes a byte array into Base64 notation. Does not GZip-compress data. * * @param source The data to convert * @return the encode bytes * @since 1.4 */ public static String encodeBytes(byte[] source) { return encodeBytes(source, 0, source.length, NO_OPTIONS); } // end encodeBytes
/** * Encodes a byte array into Base64 notation. * Does not GZip-compress data. * * @param source The data to convert * @param off Offset in array where conversion should begin * @param len Length of data to convert * @return the text node * @since 1.4 */ public static String encodeBytes(byte[] source, int off, int len) { return encodeBytes(source, off, len, NO_OPTIONS); } // end encodeBytes
/** * Encodes a byte array into Base64 notation. * Does not GZip-compress data. * * @param source The data to convert * @param off Offset in array where conversion should begin * @param len Length of data to convert * @return the text node * @since 1.4 */ public static String encodeBytes(byte[] source, int off, int len) { return encodeBytes(source, off, len, NO_OPTIONS); } // end encodeBytes
/** * Base64 encode the certificate * @param certificate * @return * @throws CertificateEncodingException */ public static String encodeAsString(Certificate certificate) throws CertificateEncodingException { return Base64.encodeBytes(certificate.getEncoded()); }
/** * Base64 encode the certificate * * @param certificate * @return * @throws CertificateEncodingException */ public static String encodeAsString(Certificate certificate) throws CertificateEncodingException { return Base64.encodeBytes(certificate.getEncoded()); }
/** * Apply base64 encoding on the message * * @param stringToEncode * @return */ public static String base64Encode(String stringToEncode) throws IOException { return Base64.encodeBytes(stringToEncode.getBytes("UTF-8"), Base64.DONT_BREAK_LINES); }
/** * Apply base64 encoding on the message * @param stringToEncode * @return */ public static String base64Encode(String stringToEncode) throws IOException { return Base64.encodeBytes(stringToEncode.getBytes("UTF-8"), Base64.DONT_BREAK_LINES); }
/** * Apply base64 encoding on the message * @param stringToEncode * @return */ public static String base64Encode(String stringToEncode) throws IOException { return Base64.encodeBytes(stringToEncode.getBytes("UTF-8"), Base64.DONT_BREAK_LINES); }
/** * On the byte array, apply base64 encoding following by URL encoding * @param stringToEncode * @return * @throws IOException */ public static String base64URLEncode(byte[] stringToEncode) throws IOException { String base64Request = Base64.encodeBytes(stringToEncode, Base64.DONT_BREAK_LINES); return urlEncode(base64Request); }
/** * Apply deflate compression followed by base64 encoding * @param stringToEncode * @return * @throws IOException */ public static String deflateBase64Encode(byte[] stringToEncode) throws IOException { byte[] deflatedMsg = DeflateUtil.encode(stringToEncode); return Base64.encodeBytes(deflatedMsg); }
public static String encode64(byte[] secret, String cipherAlgorithm, SecretKey cipherKey, PBEParameterSpec cipherSpec) throws Exception { byte[] encoding = encode(secret, cipherAlgorithm, cipherKey, cipherSpec); String b64 = Base64.encodeBytes( encoding ); return b64; }
/** * Apply deflate compression followed by base64 encoding * * @param stringToEncode * @return * @throws IOException */ public static String deflateBase64Encode(byte[] stringToEncode) throws IOException { byte[] deflatedMsg = DeflateUtil.encode(stringToEncode); return Base64.encodeBytes(deflatedMsg); }
/** * On the byte array, apply base64 encoding following by URL encoding * * @param stringToEncode * @return * @throws IOException */ public static String base64URLEncode(byte[] stringToEncode) throws IOException { String base64Request = Base64.encodeBytes(stringToEncode, Base64.DONT_BREAK_LINES); return urlEncode(base64Request); }
public static String encode64(byte[] secret, String cipherAlgorithm, SecretKey cipherKey, PBEParameterSpec cipherSpec) throws Exception { byte[] encoding = encode(secret, cipherAlgorithm, cipherKey, cipherSpec); String b64 = Base64.encodeBytes(encoding); return b64; }
/** * On the byte array, apply base64 encoding following by URL encoding * @param stringToEncode * @return * @throws IOException */ public static String base64URLEncode(byte[] stringToEncode) throws IOException { String base64Request = Base64.encodeBytes(stringToEncode, Base64.DONT_BREAK_LINES); return urlEncode(base64Request); }
/** * Apply deflate compression followed by base64 encoding * @param stringToEncode * @return * @throws IOException */ public static String deflateBase64Encode(byte[] stringToEncode) throws IOException { byte[] deflatedMsg = DeflateUtil.encode(stringToEncode); return Base64.encodeBytes(deflatedMsg); }
public static String encode64(byte[] secret, String cipherAlgorithm, SecretKey cipherKey, PBEParameterSpec cipherSpec) throws Exception { byte[] encoding = encode(secret, cipherAlgorithm, cipherKey, cipherSpec); String b64 = Base64.encodeBytes( encoding ); return b64; }