A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Encrypting the contents of of text box?

  1. #1
    Senior Member etuom's Avatar
    Join Date
    Sep 2006
    Location
    Minnesota
    Posts
    193

    Encrypting the contents of of text box?

    This might be crazy but here is what I would like to do.

    have a text box that I can type plaintext into, click a button which then calls for Actionscript to apply an encryption algorithm to each letter in the textbox and then return the ciphertext to a second textbox....then be able to decrypt the ciphertext back to plaintext.

    The important part would be having access to each letter individually in order to apply the encryption.

    The encryption would be written in the AS editor.

    Just for fun, nothing important.

    Anyone got any ideas?

  2. #2
    Senior Member etuom's Avatar
    Join Date
    Sep 2006
    Location
    Minnesota
    Posts
    193
    There has already been work done on this. Plenty of stuff out there. If I find anything useful I'll post it here.

  3. #3
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    There's the string functions charAt(index) and charCodeAt(index) you could use to access each character.

  4. #4
    Senior Member etuom's Avatar
    Join Date
    Sep 2006
    Location
    Minnesota
    Posts
    193
    Quote Originally Posted by w.brants View Post
    There's the string functions charAt(index) and charCodeAt(index) you could use to access each character.
    Thanks Wilbert!

    Upon investigation of the AS3 Language reference I have found that fromCharCode() is another useful function in this project. Thre are others as well.

  5. #5
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    http://code.google.com/p/as3crypto/

    And cool if you want to encrypt and send to PHP then decrypt
    http://flashcodetips.blogspot.com/20...using-php.html

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center