Within my code I generate public/private key pairs. I would like to store them to a MSSQL2008 database table. My current table has a column for public key and one for private key, both of which are of type varchar.
Is there a way for me to store the keys as they are, or do/should I convert them to String and store them as varchar?
Apart from the fact that the idea of storing unencrypted private keys in unsecured storage is questionable, you could use
binaryorvarbinarydata type to store the bytes of your keys without converting them tovarchar.