Open bdargan opened 5 years ago
@bdargan thanks for the pull request. The Box.encrypt method returns a cypher box which includes the nonce already therefore no need to include it as an extra parameter. What's the use case?
Main use case is to encrypt and serialize a Box and then deserialize and decrypt it, this requires the original nonce . Also there is inconsistency with docs and method signature on Box.decrypt. 2nd param described as a nonce, but this is not on the method signature.
thx
@bdargan Can you please fix the conflicts?
Needed Box.decrypt to handle a nonce buffer.
also includes the Nan to fix https://github.com/paixaop/node-sodium/issues/124#issuecomment-345090082