All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jivesoftware.util.Encryptor Maven / Gradle / Ivy

The newest version!
package org.jivesoftware.util;

public interface Encryptor {

    /**
     * Encrypt a clear text String. 
     *
     * @param value The clear text attribute
     * @return The encrypted attribute, or null
     */
    String encrypt( String value );

    /**
     * Decrypt an encrypted String. 
     *
     * @param value The encrypted attribute in Base64 encoding
     * @return The clear text attribute, or null
     */
    String decrypt( String value );

    /**
     * Set the encryption key. This will apply the user-defined key,
     * truncated or filled (via the default key) as needed  to meet
     * the key length specifications.
     *
     * @param key The encryption key
     */
    void setKey( String key );

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy