/** * <p> * Sets the the form in which String output * will be encoded. Available encoding types are: * </p> * <ul> * <li><tt><b>base64</b></tt> (default)</li> * <li><tt><b>hexadecimal</b></tt></li> * </ul> * <p> * If not set, null will be returned. * </p> * * @param stringOutputType the string output type. */ public synchronized void setStringOutputType(final String stringOutputType) { this.firstEncryptor.setStringOutputType(stringOutputType); }
/** * <p> * Sets the the form in which String output * will be encoded. Available encoding types are: * </p> * <ul> * <li><tt><b>base64</b></tt> (default)</li> * <li><tt><b>hexadecimal</b></tt></li> * </ul> * <p> * If not set, null will be returned. * </p> * * @param stringOutputType the string output type. */ public synchronized void setStringOutputType(final String stringOutputType) { this.firstEncryptor.setStringOutputType(stringOutputType); }
/** * <p> * Sets the the form in which String output * will be encoded. Available encoding types are: * </p> * <ul> * <li><tt><b>base64</b></tt> (default)</li> * <li><tt><b>hexadecimal</b></tt></li> * </ul> * <p> * If not set, null will be returned. * </p> * * @param stringOutputType the string output type. */ public synchronized void setStringOutputType(final String stringOutputType) { this.firstEncryptor.setStringOutputType(stringOutputType); }
/** * Sets the type of String output ("base64" (default), "hexadecimal") to * be used by the internal encryptor, * if a specific encryptor has not been set with <tt>setEncryptor(...)</tt>. * * @since 1.3 * * @param stringOutputType the type of String output */ public void setStringOutputType(final String stringOutputType) { if (this.encryptorSet) { throw new EncryptionInitializationException( "An encryptor has been already set: no " + "further configuration possible on hibernate wrapper"); } final StandardPBEStringEncryptor standardPBEStringEncryptor = (StandardPBEStringEncryptor) this.encryptor; standardPBEStringEncryptor.setStringOutputType(stringOutputType); }
synchronized StandardPBEStringEncryptor[] cloneAndInitializeEncryptor(final int size) { final StandardPBEByteEncryptor[] byteEncryptorClones = this.byteEncryptor.cloneAndInitializeEncryptor(size); initializeSpecifics(); final StandardPBEStringEncryptor[] clones = new StandardPBEStringEncryptor[size]; clones[0] = this; for (int i = 1; i < size; i++) { clones[i] = new StandardPBEStringEncryptor(byteEncryptorClones[i]); if (CommonUtils.isNotEmpty(this.stringOutputType)) { clones[i].setStringOutputType(this.stringOutputType); } } return clones; }
synchronized StandardPBEStringEncryptor[] cloneAndInitializeEncryptor(final int size) { final StandardPBEByteEncryptor[] byteEncryptorClones = this.byteEncryptor.cloneAndInitializeEncryptor(size); initializeSpecifics(); final StandardPBEStringEncryptor[] clones = new StandardPBEStringEncryptor[size]; clones[0] = this; for (int i = 1; i < size; i++) { clones[i] = new StandardPBEStringEncryptor(byteEncryptorClones[i]); if (CommonUtils.isNotEmpty(this.stringOutputType)) { clones[i].setStringOutputType(this.stringOutputType); } } return clones; }
synchronized StandardPBEStringEncryptor[] cloneAndInitializeEncryptor(final int size) { final StandardPBEByteEncryptor[] byteEncryptorClones = this.byteEncryptor.cloneAndInitializeEncryptor(size); initializeSpecifics(); final StandardPBEStringEncryptor[] clones = new StandardPBEStringEncryptor[size]; clones[0] = this; for (int i = 1; i < size; i++) { clones[i] = new StandardPBEStringEncryptor(byteEncryptorClones[i]); if (CommonUtils.isNotEmpty(this.stringOutputType)) { clones[i].setStringOutputType(this.stringOutputType); } } return clones; }
newEncryptor.setStringOutputType(this.stringOutputType);