@RefreshScope @Component public class CryptomanagerUtils extends Object
| Constructor and Description |
|---|
CryptomanagerUtils() |
| Modifier and Type | Method and Description |
|---|---|
SecretKey |
getDecryptedSymmetricKey(CryptomanagerRequestDto cryptomanagerRequestDto)
Calls Key-Manager-Service to decrypt symmetric key.
|
PublicKey |
getPublicKey(CryptomanagerRequestDto cryptomanagerRequestDto)
Calls Key-Manager-Service to get public key of an application.
|
boolean |
isValidSalt(String salt)
Function to check is salt is valid.
|
static String |
nullOrTrim(String parameter)
Change Parameter form to trim if not null.
|
java.time.LocalDateTime |
parseToLocalDateTime(String dateTime)
Parse a date string of pattern UTC_DATETIME_PATTERN into
LocalDateTime. |
public PublicKey getPublicKey(CryptomanagerRequestDto cryptomanagerRequestDto)
cryptomanagerRequestDto - CryptomanagerRequestDto instancePublicKey returned by Key Manager Servicepublic SecretKey getDecryptedSymmetricKey(CryptomanagerRequestDto cryptomanagerRequestDto)
cryptomanagerRequestDto - CryptomanagerRequestDto instanceSecretKey from Key Manager Servicepublic static String nullOrTrim(String parameter)
parameter - parameterpublic boolean isValidSalt(String salt)
salt - saltCopyright © 2020. All rights reserved.