Package com.logicaldoc.util.crypt
Class CryptUtil
java.lang.Object
com.logicaldoc.util.crypt.CryptUtil
- 
Nested Class SummaryNested Classes
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidvoidstatic 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
 
- 
CryptUtilpublic 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
 
- 
encryptSHA256This method encodes a given string using the SHA-256 algorithm- Parameters:
- original- String to encode
- Returns:
- Encoded string
- Throws:
- NoSuchAlgorithmException- Cripting exception
 
- 
hashMD4Converts a string into a MD4 hash.- Parameters:
- original- the original string to be encrypted.
- Returns:
- the returned hash as bytes.
 
- 
hashNTLM1Converts a string into a MD4 hash suitable for the NTLM v1 authentication- Parameters:
- original- the original string
- Returns:
- the MD4 hash
 
- 
getHex
 
-