Skip to content

Commit

Permalink
Merged the if keysize statement into one.
Browse files Browse the repository at this point in the history
mezdanak committed Jun 14, 2019
1 parent c3dce76 commit c6ac029
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions main.m
Original file line number Diff line number Diff line change
@@ -424,14 +424,11 @@ void printKey(NSDictionary *keyItem)
printAccessibleAttribute(accessibleString);
printToStdOut(@"Application Label: %@\n", [keyItem objectForKey:(id)kSecAttrApplicationLabel]);
printToStdOut(@"Key Class: %@\n", keyClass);
if (keySize)
{
printToStdOut(@"Permanent Key: %@\n", CFBooleanGetValue((CFBooleanRef)[keyItem objectForKey:(id)kSecAttrIsPermanent]) == true ? @"True" : @"False");
}
printToStdOut(@"Key Size: %@\n", [keyItem objectForKey:(id)kSecAttrKeySizeInBits]);
printToStdOut(@"Effective Key Size: %@\n", [keyItem objectForKey:(id)kSecAttrEffectiveKeySize]);
if (keySize)
{
printToStdOut(@"Permanent Key: %@\n", CFBooleanGetValue((CFBooleanRef)[keyItem objectForKey:(id)kSecAttrIsPermanent]) == true ? @"True" : @"False");
printToStdOut(@"For Encryption: %@\n", CFBooleanGetValue((CFBooleanRef)[keyItem objectForKey:(id)kSecAttrCanEncrypt]) == true ? @"True" : @"False");
printToStdOut(@"For Decryption: %@\n", CFBooleanGetValue((CFBooleanRef)[keyItem objectForKey:(id)kSecAttrCanDecrypt]) == true ? @"True" : @"False");
printToStdOut(@"For Key Derivation: %@\n", CFBooleanGetValue((CFBooleanRef)[keyItem objectForKey:(id)kSecAttrCanDerive]) == true ? @"True" : @"False");

0 comments on commit c6ac029

Please sign in to comment.