Return size of the key in bits

This commit is contained in:
Sergey Abramchuk
2017-09-07 14:26:05 +03:00
parent a346e0c51a
commit 8ead0babeb
2 changed files with 6 additions and 0 deletions
+4
View File
@@ -29,6 +29,10 @@
return self;
}
- (NSInteger)size {
return mbedtls_pk_get_bitlen(self.ctx);
}
+ (nullable OpenVPNPrivateKey *)keyWithPEM:(NSData *)pemData password:(NSString *)password error:(out NSError **)error {
OpenVPNPrivateKey *key = [OpenVPNPrivateKey new];