You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I use a passphrase that is (.getBytes "foobar") then it all works ok, but I would have assumed that working with strings would be the natural thing to do. A simple .getBytes before passing on the passphrase would solve the issue.
Thanks!
The text was updated successfully, but these errors were encountered:
Hi,
This line does no extra conversions of the passphrase from string to byte[]:
https://github.com/pallet/ssh-transport/blob/develop/src/pallet/ssh/transport.clj#L25
In the underlying lib the passphrase is assumed to be a byte array:
https://github.com/hugoduncan/clj-ssh/blob/develop/src/clj_ssh/ssh.clj#L136
I end up getting an exception of String not being convertible to byte[] here:
https://github.com/hugoduncan/clj-ssh/blob/develop/src/clj_ssh/ssh.clj#L180
The decrypt method does have an overload that takes a String, but I assume because of the type hint the byte[] version gets forced:
http://epaul.github.com/jsch-documentation/javadoc/com/jcraft/jsch/KeyPair.html
If I use a passphrase that is (.getBytes "foobar") then it all works ok, but I would have assumed that working with strings would be the natural thing to do. A simple .getBytes before passing on the passphrase would solve the issue.
Thanks!
The text was updated successfully, but these errors were encountered: