Hi,

I'm working on an upgrade from 3.0 sp1 to 4.0 sp1, and I've run into 
a problem. We used the TextBuffer.encrypt method to encrypt credit 
cards in v 3.0. I know that this method has been removed, and that 
TextBuffer.decryptOld() is available in v 4 to help in the 
transition. My problem is that the DecryptOld method is not returning 
our data intact.

I've created a job to demonstrate the problem. If you run it in 
version 3, it works. If you run it in verion 4, the data is only 80% 
right.

Version 3 job =============

static void DecodeTest1(Args _args)
{
    TextBuffer  txt = new TextBuffer();
    ;
    txt.setText("4444555566667777");
    info(strfmt("Clear text: %1",txt.getText()));
    txt.encrypt(123456);
    info(strfmt("Encrypted: %1",txt.getText()));

    txt.setText("ÔÑ2G¡.Ÿ¤®‹LAûH9þ");
    info(strfmt("Encryped text: %1",txt.getText()));
    txt.decrypt(123456);
    info(strfmt("Decrypted: %1",txt.getText()));  
}
===========
The output shows the text is encrypted and decrypted.

Now run just the decryption in version 4:
===========

static void DecodeTest1(Args _args)
{

    TextBuffer  txt = new TextBuffer();
    ;
    txt.setText("ÔÑ2G¡.Ÿ¤®‹LAûH9þ");
    info(strfmt("Encryped text: %1",txt.getText()));
    txt.decryptold(123456);
    info(strfmt("Decrypted: %1",txt.getText()));
}

The result is
     Decrypted: 444455僮56鷄667777
instead of
     Decrypted: 4444555566667777
(In case the unicode characters don't display, in the version 4 
result 2 of the numbers are replaced by Asian symbols.)

In web searches I could not find anyone else reporting problems with 
the DecryptOld method. I could really use some help.

Thanks!

RALorenz



Reply via email to