After 2 hours of trial and error, I must admit that the erlang crypto module is really confusing
#myelixirstatus
-
-
Replying to @ino_murko
I figured it out at the end The sign function says it accepts a
as binary, but I couldnt figure out how to format the thing1 reply 0 retweets 1 like -
Replying to @BogdanHabic @ino_murko
ended up converting a pem file to a PrivateKey record, and then using the fields I need to get the other format to work
2 replies 0 retweets 0 likes -
Replying to @BogdanHabic
:public_key has a higher level API for sign and verify that takes care of that for you
1 reply 0 retweets 0 likes -
Replying to @voltonez @BogdanHabic
you typically don't want to deal with :crypto directly for asymmetrical crypto, only for symmetrical
1 reply 0 retweets 1 like -
Replying to @voltonez
I ended up using :public_kry for parsing the PEM file, and :crypto for signing :public_key can be used for the whole thing?
1 reply 0 retweets 0 likes
yes, there's a sign and a verify function that wraps :crypto, probably doing exactly what you did yourself
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
