Add support for using NSData for passwords/keys.

When using some algorithms like diffie-hellman the resulting key is not
a printable string.
This change adds support for storing that kind of keys.