Interface SecureInterface

All Known Implementing Classes:
Secure

public interface SecureInterface
iDempiere interface for enryption, decryption.
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
  • Field Details

  • Method Details

    • 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.
      Parameters:
      value - clear value
      AD_Client_ID -
      Returns:
      encrypted integer value
    • decrypt

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

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

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

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

      Timestamp decrypt(Timestamp value, int AD_Client_ID)
      Decryption.
      Parameters:
      value - encrypted value
      AD_Client_ID -
      Returns:
      decrypted Timestamp value
    • getDigest

      String getDigest(String value)
      Digest string value. JavaScript version see - http://pajhome.org.uk/crypt/md5/index.html
      Parameters:
      value - message
      Returns:
      HexString of digested 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
    • getSHA512Hash

      String getSHA512Hash(int iterations, String value, byte[] salt) throws NoSuchAlgorithmException, UnsupportedEncodingException
      Convert String and salt to SHA-512 hash with iterations https://www.owasp.org/index.php/Hashing_Java
      Parameters:
      value - message
      Returns:
      HexString of message (length = 128 characters)
      Throws:
      NoSuchAlgorithmException
      UnsupportedEncodingException