# Testing encrypted payloads

**URL:** <https://community.postman.com/t/testing-encrypted-payloads/11253>\
**Category:** Help Hub\
**Created:** [March 9, 2020, 1:39pm UTC](https://community.postman.com/t/testing-encrypted-payloads/11253 "2020-03-09T13:39:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Portugal1](https://avatars.discourse-cdn.com/v4/letter/p/8c91f0/32.png) [@Portugal1](https://community.postman.com/u/Portugal1)\
**Post date:** [March 9, 2020, 1:39pm UTC](https://community.postman.com/t/testing-encrypted-payloads/11253/1 "2020-03-09T13:39:42Z")

</div>

I need to test the decryption module in my API, how can I send encrypted payloads from postman to validate this? I need to encrypt it using a public key - self signed.

---

<div class="post-metadata">

**Author:** ![odanylewycz](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/odanylewycz/32/3240_2.png) [@odanylewycz](https://community.postman.com/u/odanylewycz)\
**Post date:** [March 9, 2020, 3:16pm UTC](https://community.postman.com/t/testing-encrypted-payloads/11253/2 "2020-03-09T15:16:42Z")

</div>

Hi @Portugal1,

Welcome to the Postman Community! 👏

You should be able to do this encryption, however it depends on the cipher you are using to encrypt. Out of the box, postman supports [crypto-js](https://www.npmjs.com/package/crypto-js) nodejs library that can be used in a pre-request script to encrypt your payload with your public key. However, I am not sure what cipher you need, which may not be available.

If you are curious about other libraries supported out of the box, check out their documentation here:  
[https://learning.postman.com/docs/postman/scripts/postman-sandbox-api-reference](https://learning.postman.com/docs/postman/scripts/postman-sandbox-api-reference)

Hope this helps!

Regards,  
Orest
