Package net.simplace.core.service
Class SecurityHelper
java.lang.Object
net.simplace.core.service.SecurityHelper
Security Helper provides methods createing and checking signatures and md5-encryptions.
- Author:
- Andreas Enders
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intCERTIFICATE_EXPIRED: The certificate is at the current time already expired,static final intCERTIFICATE_INVALID: Any other reason because of that the certificate is invalid.static final intCERTIFICATE_MISSING: No certificate was given that can be checked.static final intCERTIFICATE_NOT_YET_VALID: The certificate is at the current time not yet valid,static final intConstants that represent the following current state of a X509certificate: NOTCHECKED: The certificate has not been checked.static final intCERTIFICATE_VALID: The certificate has been checked and is currently valid, that is at the current time. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringencryptPasswordMD5(String aPassword) Encrypts the password in a secure one-way-algorithm.static intgetCertificateState(String aUserName, X509Certificate aCertificate) Returns the current state of the given certificate.static HashMap<Comparable,Comparable> Sets the TenderEventTypes default values.static StringgetCRC64Digest(String aString) Creates a hash value of the given string by the CRC64-algorithm.
-
Field Details
-
CERTIFICATE_UNCHECKED
public static final int CERTIFICATE_UNCHECKEDConstants that represent the following current state of a X509certificate: NOTCHECKED: The certificate has not been checked.- See Also:
-
CERTIFICATE_VALID
public static final int CERTIFICATE_VALIDCERTIFICATE_VALID: The certificate has been checked and is currently valid, that is at the current time.- See Also:
-
CERTIFICATE_MISSING
public static final int CERTIFICATE_MISSINGCERTIFICATE_MISSING: No certificate was given that can be checked.- See Also:
-
CERTIFICATE_NOT_YET_VALID
public static final int CERTIFICATE_NOT_YET_VALIDCERTIFICATE_NOT_YET_VALID: The certificate is at the current time not yet valid, -
CERTIFICATE_EXPIRED
public static final int CERTIFICATE_EXPIREDCERTIFICATE_EXPIRED: The certificate is at the current time already expired, -
CERTIFICATE_INVALID
public static final int CERTIFICATE_INVALIDCERTIFICATE_INVALID: Any other reason because of that the certificate is invalid.- See Also:
-
-
Method Details
-
getCertificateState
Returns the current state of the given certificate. For the possible states,- Parameters:
aUserName-aCertificate-- Returns:
- the current state of the given certificate
- See Also:
-
getCertificateStatusHashMap
Sets the TenderEventTypes default values.- Returns:
- HashMap of TenderEventTypes default values
-
getCRC64Digest
Creates a hash value of the given string by the CRC64-algorithm.- Parameters:
aString-- Returns:
- a hash value of the given string by the CRC64-algorithm
-
encryptPasswordMD5
Encrypts the password in a secure one-way-algorithm.- Parameters:
aPassword-- Returns:
- encrypted String
-