Class EncryptionService
java.lang.Object
ai.nervemind.app.service.EncryptionService
Service for encrypting and decrypting sensitive data.
Uses AES-GCM for authenticated encryption.
-
Constructor Summary
ConstructorsConstructorDescriptionEncryptionService(String keyString) Creates a new EncryptionService with the specified key. -
Method Summary
-
Constructor Details
-
EncryptionService
public EncryptionService(@Value("${nervemind.encryption.key:default-dev-key-change-in-prod}") String keyString) Creates a new EncryptionService with the specified key.- Parameters:
keyString- the master key for encryption/decryption
-
-
Method Details
-
encrypt
-
decrypt
-
isEncrypted
Checks if a value appears to be encrypted. Encrypted values are Base64 strings with a minimum length.- Parameters:
value- the string to check- Returns:
- true if the string appears to be an encrypted ciphertext
-