Hello everyone! Currently we're doing Integration ...
# suitescript
e
Hello everyone! Currently we're doing Integration with Sovos for e-Invoicing. We're trying to convert a zip file (located In file cabinet) via UserEvent to MD5 Hash code for sending Invoices. On SuiteAnswers article:76801 It shows a way but NetSuite stopped giving support for MD5 hashing. Anyone know a solution or suggestion how can we convert our file to MD5 Hash Code? (SA Link-->https://netsuite.custhelp.com/app/answers/detail/a_id/76801/kw/md5) Thanks! netsuite halo
b
pick your favorite crypto library that supports md5 and use that instead
e
Yes, we tried https://github.com/blueimp/JavaScript-MD5 this one but returned hash code doesn't match with the Sovos's hash converter which they share with us "http://onlinemd5.com/"
b
im guessing you are working with a binary file
in which case you need to convert the base64 string that netsuite uses to an input that the library can use
best bet for that is to find a library that supports base64 up front
though there is a fair chance you need to use typed arrays
e
This Is one the zip file we're trying to convert as MD5 hash code
b
that particular library looks like it expects string inputs
your zip file is not a string
netsuite represents it as a base64 encoded string, but you arent interested in the md5 of the base64 string
e
When we try to convert same zip file on http://onlinemd5.com/ It works correctly. So as I understand we need to find another library for NS side. Do you have ant other suggestions rather than which we find on github?
b
i havent seen your code
but i expect you to be making the mistake i described upfront
which is that you are calculating the md5 of the base64 string
fair chance thats not what onlinemd5.com does