AES Class



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 16/04/2009 at 17:12, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   11 
    Platform:      
    Language(s) :

    ---------
    Heyho,

    I have a problem with the AES class. I just tried out to encrypt a simple char array. This works fine with small arrays but when I try to encrypt bigger char arrays the result is cut.

    The array: "This is an example for a 100.000 digits char array 12345...."
    so the array is encrypted and decrypted and this is the result:
    "This is an example for a 3000 dig"

    I don't know whats the reason why the result is cut but I guess I did something wrong with the block size, even its a very simple to use class. Is there any example outside?

    Thanks in advance, Sebastian



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 20/04/2009 at 04:07, xxxxxxxx wrote:

    any ideas how to handle this class?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 21/04/2009 at 02:49, xxxxxxxx wrote:

    Here is a simple example how to encrypt and decrypt a block of text for instance.

    > \>      AutoAlloc<AES> aes; \>      if (!aes) \>      { \>           bDelete(text); \>           return FALSE; \>      } \> \>      aes->Init(128,128); \> \>      VLONG encdatalen = AES::CalcEncryptedDataSize(128, length); \> \>      aes->Encrypt(text, encdatalen, "mypassword"); \> \>      //do something with encrypted data \> \>      aes->Decrypt(text, encdatalen, "mypassword"); \>

    Important is to get the right length of the data block with AES::CalcEncryptedDataSize().

    cheers,
    Matthias



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 21/04/2009 at 04:00, xxxxxxxx wrote:

    Thank you - works fine. Yes, you are right, I just passed the wrong length of the text (was different because of the encoding).


Log in to reply