Compiere 3.1

org.compiere.api
Interface SecureInterface


public interface SecureInterface

Compiere Security Interface. To enable your own class, you need to set the property COMPIERE_SECURE when starting the client or server. The setting for the default class would be: -DCOMPIERE_SECURE=org.compiere.util.Secure

Version:
$Id: SecureInterface.java,v 1.2 2006/07/30 00:52:23 jjanke Exp $
Author:
Jorg Janke

Field Summary
static String CLEARVALUE_END
          Clear Text Indicator
static String CLEARVALUE_START
          Clear Text Indicator xyz
static String COMPIERE_SECURE
          Class Name implementing SecureInterface
static String COMPIERE_SECURE_DEFAULT
          Default Class Name implementing SecureInterface
static String ENCRYPTEDVALUE_END
          Encrypted Text Indicator ~
static String ENCRYPTEDVALUE_START
          Encrypted Text Indicator ~
static String KEY_ALGORITHM
          Encryption Key Algorithm
static String KEY_VALUE
          Encryption Key Value
 
Method Summary
 BigDecimal decrypt(BigDecimal value)
          Decryption.
 Integer decrypt(Integer value)
          Decryption.
 String decrypt(String value)
          Decryption.
 Timestamp decrypt(Timestamp value)
          Decryption.
 BigDecimal encrypt(BigDecimal value)
          Encryption.
 Integer encrypt(Integer value)
          Encryption.
 String encrypt(String value)
          Encryption.
 Timestamp encrypt(Timestamp value)
          Encryption.
 String getDigest(String value)
          Convert String to Digest.
 boolean isDigest(String value)
          Checks, if value is a valid digest
 boolean isEncrypted(String value)
          Is Encrypted
 

Field Detail

COMPIERE_SECURE

static final String COMPIERE_SECURE
Class Name implementing SecureInterface

See Also:
Constant Field Values

COMPIERE_SECURE_DEFAULT

static final String COMPIERE_SECURE_DEFAULT
Default Class Name implementing SecureInterface

See Also:
Constant Field Values

KEY_VALUE

static final String KEY_VALUE
Encryption Key Value

See Also:
Constant Field Values

KEY_ALGORITHM

static final String KEY_ALGORITHM
Encryption Key Algorithm

See Also:
Constant Field Values

CLEARVALUE_START

static final String CLEARVALUE_START
Clear Text Indicator xyz

See Also:
Constant Field Values

CLEARVALUE_END

static final String CLEARVALUE_END
Clear Text Indicator

See Also:
Constant Field Values

ENCRYPTEDVALUE_START

static final String ENCRYPTEDVALUE_START
Encrypted Text Indicator ~

See Also:
Constant Field Values

ENCRYPTEDVALUE_END

static final String ENCRYPTEDVALUE_END
Encrypted Text Indicator ~

See Also:
Constant Field Values
Method Detail

isEncrypted

boolean isEncrypted(String value)
Is Encrypted

Parameters:
value - value
Returns:
true if value is an encrypted String

encrypt

String encrypt(String value)
Encryption.

Parameters:
value - clear value
Returns:
encrypted String

decrypt

String decrypt(String value)
Decryption.

Parameters:
value - encrypted value
Returns:
decrypted String

encrypt

Integer encrypt(Integer value)
Encryption. The methods must recognize clear text values

Parameters:
value - clear value
Returns:
encrypted String

decrypt

Integer decrypt(Integer value)
Decryption. The methods must recognize clear text values

Parameters:
value - encrypted value
Returns:
decrypted String

encrypt

BigDecimal encrypt(BigDecimal value)
Encryption. The methods must recognize clear text values

Parameters:
value - clear value
Returns:
encrypted String

decrypt

BigDecimal decrypt(BigDecimal value)
Decryption. The methods must recognize clear text values

Parameters:
value - encrypted value
Returns:
decrypted String

encrypt

Timestamp encrypt(Timestamp value)
Encryption. The methods must recognize clear text values

Parameters:
value - clear value
Returns:
encrypted String

decrypt

Timestamp decrypt(Timestamp value)
Decryption. The methods must recognize clear text values

Parameters:
value - encrypted value
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

Compiere 3.1

Compiere® is a registered trademark of ComPiere, Inc. ©2004-2008 HumanFlash.com All rights reserved.