The encryption API provides functionality that allows the encryption/decryption of passwords or secrets using the configured Aspire Encryption Provider.
Encrypts a given password or secret, this endpoint need at least the OPERATOR role to be executed.
POST /aspire/_api/encryption/encrypt
Request body
{ "0" : "secretToEncrypt1", "1" : "secretToEncrypt2" }
Exception
The request body does not accept as a key the character "$"
Response
{ "0" : "encrypted:...........", "1" : "encrypted:............" }
Status: 200
Decrypts a given password or secret, this endpoint need at least the ADMINISTRATOR role to be executed.
POST /aspire/_api/encryption/decrypt
Request body
encrypted:....................
Response
secretToEncrypt1
Status: 200