Interface SecureInterface

  • All Known Implementing Classes:
    Secure

    public interface SecureInterface
    Adempiere Security Interface. To enable your own class, you need to set the property ADEMPIERE_SECURE when starting the client or server. The setting for the default class would be: -DADEMPIERE_SECURE=org.compiere.util.Secure
    Version:
    $Id: SecureInterface.java,v 1.2 2006/07/30 00:52:23 jjanke Exp $
    Author:
    Jorg Janke
    • Method Detail

      • encrypt

        String encrypt​(String value,
                       int AD_Client_ID)
        Encryption.
        Parameters:
        value - clear value
        AD_Client_ID -
        Returns:
        encrypted String
      • decrypt

        String decrypt​(String value,
                       int AD_Client_ID)
        Decryption.
        Parameters:
        value - encrypted value
        Returns:
        decrypted String
      • encrypt

        Integer encrypt​(Integer value,
                        int AD_Client_ID)
        Encryption. The methods must recognize clear text values
        Parameters:
        value - clear value
        AD_Client_ID -
        Returns:
        encrypted String
      • decrypt

        Integer decrypt​(Integer value,
                        int AD_Client_ID)
        Decryption. The methods must recognize clear text values
        Parameters:
        value - encrypted value
        AD_Client_ID -
        Returns:
        decrypted String
      • encrypt

        BigDecimal encrypt​(BigDecimal value,
                           int AD_Client_ID)
        Encryption. The methods must recognize clear text values
        Parameters:
        value - clear value
        AD_Client_ID -
        Returns:
        encrypted String
      • decrypt

        BigDecimal decrypt​(BigDecimal value,
                           int AD_Client_ID)
        Decryption. The methods must recognize clear text values
        Parameters:
        value - encrypted value
        AD_Client_ID -
        Returns:
        decrypted String
      • encrypt

        Timestamp encrypt​(Timestamp value,
                          int AD_Client_ID)
        Encryption. The methods must recognize clear text values
        Parameters:
        value - clear value
        AD_Client_ID -
        Returns:
        encrypted String
      • decrypt

        Timestamp decrypt​(Timestamp value,
                          int AD_Client_ID)
        Decryption. The methods must recognize clear text values
        Parameters:
        value - encrypted value
        AD_Client_ID -
        Returns:
        decrypted String
      • getDigest

        String getDigest​(String value)
        Convert String to Digest. JavaScript version see - http://pajhome.org.uk/crypt/md5/index.html
        Parameters:
        value - message
        Returns:
        HexString of message (length = 32 characters)
      • isDigest

        boolean isDigest​(String value)
        Checks, if value is a valid digest
        Parameters:
        value - digest string
        Returns:
        true if valid digest