Open hohl opened 10 years ago
@hohl is it possible for now at least to get NSData of generated keys?
What do you mean with NSData
?
It is already possible to use toData
for exporting. However at the moment you have no choice about choosing the (file) format. For example MIHRSAPublicKey will always export to "*.pub" files as you may know it from OpenSSL anyway (for example same format as used by ~/.ssh/id_rsa.pub
for SSH auth).
However this issue is about moving these functionality from the domain classes itself to an exporter class. Then it would be possible to export single keys into multiple different formats. Like having a "MIHOpenSSLExporter" and a "MIHPuttyExporter".
Allow the exporting and importing of private and public keys as files. It would be good design to add these two interface:
MIHExporter
MIHImporter
...providing the ability to import/export
MIHPrivateKey
,MIHPublicKey
andMIHSymmetricKey
. Every file format could be one implementation for these interfaces.There should also be the ability to set passwords when it is supported by the file format (like it is with P12).