tags:

views:

42

answers:

1

I am creating a sequential file which requires a digital signature (MD5 hash). While I am creating the sequential file I am also creating a dynamic array with the same data. If I perform a MD5 hash on both the sequential file and dynamic array can I expect the result to be the same or different?

+5  A: 

No, generally they won't be the same.

When you are adding to the dynamic array, you are probably introducing attribute (@AM) markers for each new line, whereas with sequential files they will stay as the native new line characters.

If you are using a UNIX system to run UniData, you can do a CONVERT @AM TO CHAR(10) IN MYARRAY and it should be equivalent.

If you are using a Windows system to run UniData, you can do a SWAP @AM WITH CHAR(13):CHAR(10) IN MYARRAY and it should be equivalent.

Disclaimer: Above code has not been tested.

Dan McGrath