using Spring Vault dependency i could encrypt message but while decrypting i’m getting below error :
java.lang.RuntimeException: org.springframework.vault.VaultException: Status 400 Bad Request: invalid ciphertext: no prefix; nested exception is org.springframework.web.client.HttpClientErrorException$BadRequest: 400 Bad Request: "{"errors":["invalid ciphertext: no prefix"]}<EOL>"; nested exception is java.lang.RuntimeException: org.springframework.vault.VaultException: Status 400 Bad Request: invalid ciphertext: no prefix; nested exception is org.springframework.web.client.HttpClientErrorException$BadRequest: 400 Bad Request: "{"errors":["invalid ciphertext: no prefix"]}<EOL>"
Method used to decrypt the msg :
String decryptedMessage = vaultTemplate.opsForTransit().decrypt(path, string to be decrypted);