How to convert RSA key to ssh-rsa
问题 I am trying to convert a generated public RSA key to a SSH using Apples security framework. Here is the code I am using for generating the key pairs: - (void)generatePrivateKey { NSDictionary *privateKeyAttr = @{(__bridge id)kSecAttrIsPermanent: @YES, (__bridge id)kSecAttrApplicationTag: self.privateTag}; NSDictionary *publicKeyAttr = @{(__bridge id)kSecAttrIsPermanent: @YES, (__bridge id)kSecAttrApplicationTag: self.publicTag}; NSDictionary *keyPairAttr = @{(__bridge id)kSecAttrKeySizeInBits