Azure / Azure/api-management-policy-snippets

No byte[] decrypt / encrypt in api-management-policy-snippets/examples /Encrypt data using expressions.policy.xml

Open
#114 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
399
Forks
170
PR merge metrics
No merged PRs in 30d

Description

Encrypt data using expressions.policy.xml and Decrypt AES Data using policy expressions.xml appear not to work.
```
byte[] inBytes = Convert.FromBase64String(context.Request.Body.As().SelectToken("encrpText").ToString());
byte[] decryptedBytes = **inBytes.Decrypt**("Aes", key, IV);**
```
```
byte[] gooberBytes = Encoding.UTF8.GetBytes(goober);
byte[] encryptedBytes = gooberBytes**.Encrypt("Aes", key, IV);**
```
Byte[] doesn't have an encrypt or decrypt method. It also appears that symmetrical encryption isn't possible in API management.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by opening examples/Encrypt data using expressions.policy.xml and Decrypt AES Data using policy expressions.xml and checking the byte[] Encrypt and Decrypt calls shown in the issue. Verify whether those operations are supported in API Management policy expressions; done means the examples work as documented or clearly state the limitation and supported approach.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
api, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.