@Override public String encrypt(String text) { // Null not allowed checkNotNull(text, "text"); // Convert the text into bytes byte[] bytes = getUTF8Bytes(text); // Encrypt the bytes byte[] encrypted = encrypt(bytes); // Encode as base 64 byte[] base64 = encodeBase64(encrypted); // Convert the base64 bytes into a string return getAsciiString(base64); }