Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in BodyHashOfENMLHash? #10

Open
sumitrshah opened this issue Jan 24, 2014 · 1 comment
Open

Bug in BodyHashOfENMLHash? #10

sumitrshah opened this issue Jan 24, 2014 · 1 comment

Comments

@sumitrshah
Copy link

Hi,

Thanks for your good work on this module.

I think there may be a bug in the function converting the hexadecimal hash for a resource to a binary hash. It doesn't seem to work properly for me when I create a map of the binary hash to the resource URL.

My workaround has been to:

(1) convert the binary hash received from the Evernote API (using the Evernote Node library) to a hex string by using the Node Buffer class << new Buffer(resource.data.bodyHash).toString('hex') >>;

(2) map the hex hash to the resource URL (instead of the binary hash); and

(3) comment out line 157, which runs the BodyHashOfENMLHash function on the hex hash pulled from the ENML

You might want to take a look at the hex hash to binary hash helper function and see if there's something there causing problems.

Thanks.

@wanasit
Copy link
Owner

wanasit commented Feb 20, 2014

Hello, sorry for taking really long time to response to the problem.

The thing is I wrote this library before the Evernote's official javascript SDK came out. And most people, at the time, didn't use Uint8Array to handle binary fields (instead, we used normal String).

I think it's time to rewrite the library to work with the official SDK.
Give me a weekend to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants