@Service public class SecurityDataService extends Object
| Constructor and Description |
|---|
SecurityDataService(org.springframework.core.env.Environment environment,
CryptoProviderHolder cryptoProviderHolder) |
| Modifier and Type | Method and Description |
|---|---|
Optional<DecryptedData> |
decryptConsentData(String encryptedId,
byte[] aspspConsentData)
Decrypt ASPSP consent data
|
Optional<String> |
decryptId(String encryptedId)
Decrypts encrypted external ID
|
Optional<EncryptedData> |
encryptConsentData(String encryptedId,
byte[] aspspConsentData)
Encrypts ASPSP consent data
|
Optional<String> |
encryptId(String originalId)
Encrypts external consent ID with secret consent key via configuration server key
|
boolean |
isConsentIdEncrypted(String consentId)
Checks whether paymentId is encrypted or not
|
@Autowired
public SecurityDataService(org.springframework.core.env.Environment environment,
CryptoProviderHolder cryptoProviderHolder)
public Optional<String> encryptId(String originalId)
originalId - external consent ID to encryptpublic Optional<String> decryptId(String encryptedId)
encryptedId - encrypted ID for the inputpublic Optional<EncryptedData> encryptConsentData(String encryptedId, byte[] aspspConsentData)
encryptedId - encrypted consent IDaspspConsentData - original data to be encryptedpublic Optional<DecryptedData> decryptConsentData(String encryptedId, byte[] aspspConsentData)
encryptedId - encrypted consent IDaspspConsentData - encrypted data to be decryptedpublic boolean isConsentIdEncrypted(String consentId)
consentId - id of consenttrue if paymentId is encrypted. false otherwise.Copyright © 2020. All rights reserved.