Closed SimeonC closed 5 years ago
+1, Any explanation on this error (or all errors) in a docs - will be helpful
Encrypt needs parameter named key
, not a _key
. Is there documentation
that says otherwise?
On Fri, Oct 2, 2015 at 3:12 PM, dr.dimitru notifications@github.com wrote:
+1
— Reply to this email directly or view it on GitHub https://github.com/keybase/triplesec/issues/41#issuecomment-145129026.
@maxtaco thank you for reply, but I believe my error is passed values into encrypt
method. Which types of parameters it accepts in browser? Uint8Array
?
Found an answer by myself, but it will be more better to see it in docs (API docs isn't readable and didn't give understanding of how this thing works), so encrypt
/decrypt
methods accepts triplesec.Buffer
:
triplesec.encrypt({key: new triplesec.Buffer('pass'), data: new triplesec.Buffer('value')}, function(err, res){console.log(err,res)});
Using the following coffeescript I get this error:
Error: in KDF: Failed due to scrubbed key!
But the following works flawsessly:
I think somewhere in the triplesec a _key variable is not being scoped properly?