spring-projects / spring-vault

Provides familiar Spring abstractions for HashiCorp Vault
https://spring.io/projects/spring-vault
Apache License 2.0
283 stars 186 forks source link

Support `prehashed` for the Transit engine #745

Closed Gentoli closed 1 year ago

Gentoli commented 1 year ago

https://developer.hashicorp.com/vault/api-docs/secret/transit#prehashed

prehashed (bool: false) - Set to true when the input is already hashed. If the key type is rsa-2048, rsa-3072 or rsa-4096, then the algorithm used to hash the input should be indicated by the hash_algorithm parameter. Just as the value to sign should be the base64-encoded representation of the exact binary data you want signed, when set, input is expected to be base64-encoded binary hashed data, not hex-formatted. (As an example, on the command line, you could generate a suitable input via openssl dgst -sha256 -binary | base64.)

mp911de commented 1 year ago

Feel free to submit a pull request.