Package org.compiere.util
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
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Class Name implementing SecureInterfacestatic final String
Default Class Name implementing SecureInterfacestatic final String
Clear Text Indicatorstatic final String
Clear Text Indicator xyzstatic final String
Encrypted Text Indiactor ~static final String
Encrypted Text Indiactor ~ -
Method Summary
Modifier and TypeMethodDescriptionDecryption.Decryption.decrypt
(BigDecimal value, int AD_Client_ID) Decryption.Decryption.Encryption.Encryption.encrypt
(BigDecimal value, int AD_Client_ID) Encryption.Encryption.Digest string value.getSHA512Hash
(int iterations, String value, byte[] salt) Convert String and salt to SHA-512 hash with iterations https://www.owasp.org/index.php/Hashing_Javaboolean
Checks, if value is a valid digest
-
Field Details
-
ADEMPIERE_SECURE
Class Name implementing SecureInterface- See Also:
-
ADEMPIERE_SECURE_DEFAULT
Default Class Name implementing SecureInterface- See Also:
-
CLEARVALUE_START
Clear Text Indicator xyz- See Also:
-
CLEARVALUE_END
Clear Text Indicator- See Also:
-
ENCRYPTEDVALUE_START
Encrypted Text Indiactor ~- See Also:
-
ENCRYPTEDVALUE_END
Encrypted Text Indiactor ~- See Also:
-
-
Method Details
-
encrypt
Encryption.- Parameters:
value
- clear valueAD_Client_ID
-- Returns:
- encrypted String
-
decrypt
Decryption.- Parameters:
value
- encrypted value- Returns:
- decrypted String
-
encrypt
Encryption.- Parameters:
value
- clear valueAD_Client_ID
-- Returns:
- encrypted integer value
-
decrypt
Decryption.- Parameters:
value
- encrypted valueAD_Client_ID
-- Returns:
- decrypted integer value
-
encrypt
Encryption.- Parameters:
value
- clear valueAD_Client_ID
-- Returns:
- encrypted BigDecimal value
-
decrypt
Decryption.- Parameters:
value
- encrypted valueAD_Client_ID
-- Returns:
- decrypted BigDecimal value
-
encrypt
Encryption.- Parameters:
value
- clear valueAD_Client_ID
-- Returns:
- encrypted Timestamp value
-
decrypt
Decryption.- Parameters:
value
- encrypted valueAD_Client_ID
-- Returns:
- decrypted Timestamp value
-
getDigest
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
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
-