# Simple way to encode and decode a string according to a password?

**URL:** <https://discourse.processing.org/t/simple-way-to-encode-and-decode-a-string-according-to-a-password/34298>\
**Category:** Coding Questions\
**Created:** [December 26, 2021, 3:18pm UTC](https://discourse.processing.org/t/simple-way-to-encode-and-decode-a-string-according-to-a-password/34298 "2021-12-26T15:18:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mungle](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@mungle](https://discourse.processing.org/u/mungle)\
**Post date:** [December 26, 2021, 3:18pm UTC](https://discourse.processing.org/t/simple-way-to-encode-and-decode-a-string-according-to-a-password/34298/1 "2021-12-26T15:18:27Z")

</div>

Hello everyone,  
Does Processing have built-in functions, libraries or a simple way of encoding/decoding strings using a password?

Something like this:

```auto
encode('My String', password = 'mypass') //'ajdnfladfa739adl23'
decode('ajdnfladfa739adl23', password = 'mypass') // 'My String'

```

Thanks

---

<div class="post-metadata">

**Author:** ![coffeetogo](https://avatars.discourse-cdn.com/v4/letter/c/aca169/32.png) [@coffeetogo](https://discourse.processing.org/u/coffeetogo)\
**Post date:** [December 27, 2021, 7:34pm UTC](https://discourse.processing.org/t/simple-way-to-encode-and-decode-a-string-according-to-a-password/34298/2 "2021-12-27T19:34:07Z")

</div>

This looks cool, I’m interesting to know this answer too. Anyone?
