shortest code to encrypt a string Using a language of your choice write a program that takes a string as an input, and returns the string encrypted.

Algorithm:

You should assume that each character is always encoded in a byte and is ASCII-based. The extended ASCII codes are mapped to whatever is the default code page in use by the system.

You should encrypt the code in the following way:
code of first character +1, code of second character +2, code of third character +3 .....

Extended ASCII codes are based on this table:
http://www.asciitable.com/ 

Shortest code wins.
BrainFuck: 21
&gt;,[+&lt;[-&gt;+&gt;+&lt;&lt;]&gt;.&gt;+&gt;,]

Assumes EOF=zero
echo -n 'My secret password is 123456!' | beef encrypt.bf
==&gt; N{#wjiym}*{mv36HJLNPR&gt;