|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbe.ehealth.technicalconnector.utils.ConnectorCryptoUtils
public final class ConnectorCryptoUtils
Utility class to that generates a symmectric key.
| Field Summary | |
|---|---|
static String |
CONNECTORCRYPTO_ALGO_NAME_KEY
Property to change the default algoritm used to generate a key. |
static String |
CONNECTORCRYPTO_KEYSIZE_KEY
Property to change the default keysize used to generate a key. |
static String |
CONNECTORCRYPTO_MOCK_KEY
Property to allow the use of a static key when generating a symmetric key. |
| Method Summary | |
|---|---|
static byte[] |
calculateDigest(String digestAlgo,
byte[] content)
Helper method to calculate a Digest |
static byte[] |
decrypt(Key key,
byte[] encryptedBytes)
Decrypt the encryptedBytes bases on the key. |
static byte[] |
decrypt(Key key,
String algo,
byte[] encryptedBytes)
Decrypt the encryptedBytes bases on the key and the given algoritm. |
static SecretKey |
generateKey()
Generate a key based using th default algoritm and keysize. |
static SecretKey |
generateKey(int keySize)
Generate a key based on the default algoritm and the keysize given as input. |
static SecretKey |
generateKey(String algo,
int keySize)
Generate a key based on the algoritm and keysize given as input. |
static void |
setKeyGenerator(KeyGenerator keyGenerator)
Setting the KeyGenerator to use for generating a SecretKey |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CONNECTORCRYPTO_ALGO_NAME_KEY
public static final String CONNECTORCRYPTO_KEYSIZE_KEY
public static final String CONNECTORCRYPTO_MOCK_KEY
| Method Detail |
|---|
public static SecretKey generateKey()
throws TechnicalConnectorException
TechnicalConnectorException
public static SecretKey generateKey(int keySize)
throws TechnicalConnectorException
TechnicalConnectorException
public static SecretKey generateKey(String algo,
int keySize)
throws TechnicalConnectorException
TechnicalConnectorException
public static byte[] decrypt(Key key,
byte[] encryptedBytes)
throws TechnicalConnectorException
TechnicalConnectorException
public static byte[] decrypt(Key key,
String algo,
byte[] encryptedBytes)
throws TechnicalConnectorException
TechnicalConnectorExceptionpublic static void setKeyGenerator(KeyGenerator keyGenerator)
keyGenerator -
public static byte[] calculateDigest(String digestAlgo,
byte[] content)
throws TechnicalConnectorException
TechnicalConnectorException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||