Building a cipher/code program in flash

Hi

Is it possible to make a flash application where if a User enters some text and presses a button the text is encrypted by a cipher?

For example:

What if you used a simple cipher like this:

B = a, C = b, D = c and so on

So when the User types BCD and presses the button he gets the text ABC

Or if he types IBM he gets HAL

or vise versa

I’m not sure if or how Flash could split a sentence into individual letters and swap the letters based on a cipher you create.

I’d love any feedback, but theres no rush, it would just be fun to do.

-Lem