开发者

MD5 hashing of Sequential files and dynamic arrays in UniData

开发者 https://www.devze.com 2022-12-20 01:27 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消