# Javascript encrypt

**URL:** <https://forum.kirupa.com/t/javascript-encrypt/330365>\
**Category:** web dev\
**Created:** [January 9, 2013, 10:48am UTC](https://forum.kirupa.com/t/javascript-encrypt/330365 "2013-01-09T10:48:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vincentas](https://avatars.discourse-cdn.com/v4/letter/v/dc4da7/32.png) [@Vincentas](https://forum.kirupa.com/u/Vincentas)\
**Post date:** [January 9, 2013, 10:48am UTC](https://forum.kirupa.com/t/javascript-encrypt/330365/1 "2013-01-09T10:48:54Z")

</div>

Hi there,

I need a simple javascript function that allows me to encrypt textarea data with a key (The key is the users password stored as a hashed session variable, printed by PHP into a field)

I essentially want the textarea data to be encrypted when the user clicks a button within the form.  
Thanks
