Skip to content

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

@annie8ell

Description

@annie8ell

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<JObject>().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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions