xorbit / node-aes-gcm

AES GCM module for node.js using OpenSSL
MIT License
34 stars 16 forks source link

Node 0.10 gives a different encryption result #4

Closed eoger closed 8 years ago

eoger commented 8 years ago

I'm calling the encrypt method with:

Key: "type":"Buffer","data":[168,125,71,167,119,186,91,241,119,19,122,146,63,102,224,53]}
IV: {"type":"Buffer","data":[250,231,95,142,111,77,143,87,2,2,215,153]}
Plaintext: {"type":"Buffer","data":[0,0,133,233,101]}
AAD: {"type":"Buffer","data":[]}

With node 0.11, 0.12 and 4 the result is hQFe6BBk3QBHMHbS8lMxmIjeidmW

With node 0.10.44 the result is 4-QRsR3EBk7p9yEbysMLk29M8i8C

I don't understand why there is a difference here, any pointers?

eoger commented 8 years ago

Found the culprit, I was wrong. Sorry about this.

xorbit commented 8 years ago

Thanks for double checking. :) I hadn't gotten around to duplicating it yet.