/** * Decodes a byte[] containing containing characters in the Base64 alphabet. * * @param pArray * A byte array containing Base64 character data * @return a byte array containing binary data */ public byte[] decode(byte[] pArray) { return decodeBase64(pArray); }
/** * Decodes a byte[] containing containing characters in the Base64 alphabet. * * @param pArray * A byte array containing Base64 character data * @return a byte array containing binary data */ public byte[] decode(byte[] pArray) { return decodeBase64(pArray); }
/** * Decrypts a string into a string. * * @param text * text to decrypt * @return the decrypted text */ public final String decryptUrlSafe(final String text) { try { byte[] encrypted = Base64UrlSafe.decodeBase64(text.getBytes()); return new String(decryptByteArray(encrypted), CHARACTER_ENCODING); } catch (UnsupportedEncodingException ex) { throw new WicketRuntimeException(ex.getMessage()); } }
/** * Decrypts a string into a string. * * @param text * text to decrypt * @return the decrypted text */ public final String decryptUrlSafe(final String text) { try { byte[] encrypted = Base64UrlSafe.decodeBase64(text.getBytes()); return new String(decryptByteArray(encrypted), CHARACTER_ENCODING); } catch (UnsupportedEncodingException ex) { throw new WicketRuntimeException("Error decoding text: " + text, ex); } }