Package com.logicaldoc.util.crypt
Class CryptUtil
java.lang.Object
com.logicaldoc.util.crypt.CryptUtil
- 
Nested Class Summary
Nested Classes - 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidvoidstatic StringencryptSHA(String original) This method encodes a given string using the SHA algorithm.static StringencryptSHA256(String original) This method encodes a given string using the SHA-256 algorithmstatic StringgetHex(byte[] raw) static StringConverts a string into a MD4 hash.static StringConverts a string into a MD4 hash suitable for the NTLM v1 authentication 
- 
Field Details
- 
DESEDE_ENCRYPTION_SCHEME
- See Also:
 
 - 
DES_ENCRYPTION_SCHEME
- See Also:
 
 - 
DEFAULT_ENCRYPTION_KEY
- See Also:
 
 
 - 
 - 
Constructor Details
- 
CryptUtil
- Throws:
 CryptUtil.EncryptionException
 - 
CryptUtil
public CryptUtil(String encryptionScheme, String encryptionKey) throws CryptUtil.EncryptionException - Throws:
 CryptUtil.EncryptionException
 
 - 
 - 
Method Details
- 
encrypt
- Throws:
 CryptUtil.EncryptionException
 - 
decrypt
- Throws:
 CryptUtil.EncryptionException
 - 
encrypt
- Throws:
 CryptUtil.EncryptionException
 - 
decrypt
- Throws:
 CryptUtil.EncryptionException
 - 
encryptSHA
This method encodes a given string using the SHA algorithm. This method will be dismissed in the future.- Parameters:
 original- String to encode- Returns:
 - Encoded string
 - Throws:
 NoSuchAlgorithmException- Cripting exception
 - 
encryptSHA256
This method encodes a given string using the SHA-256 algorithm- Parameters:
 original- String to encode- Returns:
 - Encoded string
 - Throws:
 NoSuchAlgorithmException- Cripting exception
 - 
hashMD4
Converts a string into a MD4 hash.- Parameters:
 original- the original string to be encrypted.- Returns:
 - the returned hash as bytes.
 
 - 
hashNTLM1
Converts a string into a MD4 hash suitable for the NTLM v1 authentication- Parameters:
 original- the original string- Returns:
 - the MD4 hash
 
 - 
getHex
 
 -