User Tag List

Results 1 to 3 of 3

Thread: AESFusion in Flash SWF

  1. #1
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    turtle's Avatar
    Join Date
    Jun 2010
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    AESFusion in Flash SWF

    Sorry not sure if I should ask this here or at the extension... caus the extension post looks very clean.

    Anyway, I am trying to use the AESFusion with Flash with it encrypting the string with a 16 char key. Then I use the Get Object to sent it over to a .aspx page.

    I am trying to decrypt it at the .aspx but I have gone partially nuts trying to figure it out.

    I know it's AES, I have used the Rijndael algo with the following assumption...

    1. The key passed into the AES is converted to a byte array so using a "888888..." will give you a {56,56,56,56,56...}

    2. I am using the cypher mode to ECB.

    3. Pading mode to PKCS7.

    4. I defaulted the IV by not doing anything to it.

    5. The output of the encryption is Hex value.

    6. Keysize of 128

    7. Blocksize of 128

    The closest I get when encrypting "hello" with the "8888888888888888" key using the AESFusion in MMF is

    356F21A8FA105D5EE5B81A28906D44BC

    while the .aspx I am making churns out

    D3575367ED69EA6FDC11F7133A38EA7

    I am sure there are something wrong somewhere but if someone got it right, please share the settings if possible. Thank you

  2. #2
    Clicker Fusion 2.5 MacFusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleInstall Creator Pro
    Christian_Wheel's Avatar
    Join Date
    Mar 2010
    Location
    Los Angeles
    Posts
    365
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: AESFusion in Flash SWF

    I also would like to know the inner workings of the algorithm for server-side script use. Jamie, could you shed some light? Pretty please?

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export Module
    turtle's Avatar
    Join Date
    Jun 2010
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: AESFusion in Flash SWF

    Server side? I am using VB.NET for the server app ad it comes with the AES en/decrypt provider... adding the

    Imports System.Security.Cryptography

    makes calling to the AES functions.
    Basically the encryption functon in VB.net looks like this

    ------------------------------------------------------------

    Public Function EncryptAES(ByVal clearText As String, ByVal key As String) As String

    Dim newarr = StrToByteArray(key)
    Dim sourceBytes = Encoding.Unicode.GetBytes(clearText)


    Dim aes = New AesCryptoServiceProvider

    aes.BlockSize = 128
    aes.FeedbackSize = 128

    aes.Key = newarr

    aes.Mode = CipherMode.ECB
    aes.Padding = PaddingMode.PKCS7

    Dim encryptor = aes.CreateEncryptor()

    Dim ms = New MemoryStream
    Dim cs = New CryptoStream(ms, encryptor, CryptoStreamMode.Write)
    cs.Write(sourceBytes, 0, sourceBytes.Length)
    cs.FlushFinalBlock()

    Dim encrypted = ms.ToArray()

    aes.Clear()
    cs.Dispose()
    ms.Dispose()

    Return encrypted

    End Function

    ------------------------------------------------------------

    The StrToByteArray function simply converts the key string to bytearray

    ------------------------------------------------------------

    Public Shared Function StrToByteArray(ByVal str As String) As Byte()
    Dim encoding As New System.Text.UTF8Encoding()
    Return encoding.GetBytes(str)
    End Function 'StrToByteArray

    ------------------------------------------------------------

    This is not the best way to do it I am sure there are other better methods

Similar Threads

  1. Flash Files and flash replacements for the unfinished surface object
    By Ethan in forum SWF/Flash Export Module Version 2.0
    Replies: 2
    Last Post: 17th June 2013, 10:34 PM
  2. Flash Player Object - Open Url: Only works with buttons on flash portals
    By Matriax in forum SWF/Flash Export Module Version 2.0
    Replies: 9
    Last Post: 6th January 2013, 09:51 AM
  3. Beta: AESFusion
    By James in forum Extension Development
    Replies: 11
    Last Post: 12th November 2012, 04:01 PM
  4. AESFusion
    By James in forum SWF/Flash Extensions
    Replies: 0
    Last Post: 19th March 2010, 04:17 PM
  5. Beta: AESFusion
    By James in forum File Archive
    Replies: 0
    Last Post: 21st January 2010, 05:39 AM

Posting Permissions

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