threemarb / threema

This gem provides access to the Threema Gateway API.
MIT License
11 stars 2 forks source link

Generated key pair is in binary format and not useable #13

Open silvermind opened 6 years ago

silvermind commented 6 years ago

Hi Guys, how can I get the actual value of the keys, required to register with https://gateway.threema.ch,

I just get some Ruby Key Objects using the Threema::E2E::Key.generate_pair command:

#<RbNaCl::Boxes::Curve25519XSalsa20Poly1305::PublicKey:66771670>
or with .to_bytes as array: 
"fw\x16p&=b&\xFBTen\x182\xBA\x89\x99ED\x02/!\xFA\xFF\xA1\xAD\xC8\xFD\xBAA\x83\x14"
thorsteneckel commented 6 years ago

Hi @silvermind - I updated the README with a proper example. I have to review the code because this should be improved 🤔 Feel free to ask any questions.