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.开发者_如何学Go 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?
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.
精彩评论