added HmacOtp comment

This commit is contained in:
Michael Starke
2017-12-05 18:28:11 +01:00
parent 5574b01fed
commit 4fa52e23ef

View File

@@ -12,6 +12,15 @@
NSString *const MPHMACOTPSeedAttributeKey = @"HMACOTP-Seed"; NSString *const MPHMACOTPSeedAttributeKey = @"HMACOTP-Seed";
NSString *const MPHMACOTPConfigAttributeKey = @"HMACOTP-Config"; NSString *const MPHMACOTPConfigAttributeKey = @"HMACOTP-Config";
/*
HmacOtp-Secret (the UTF-8 representation of the value is the secret),
HmacOtp-Secret-Hex (secret as hex string),
HmacOtp-Secret-Base32 (secret as Base32 string)
HmacOtp-Secret-Base64 (secret as Base64 string)
HmacOtp-Counter field.
*/
@interface MPAddCustomFieldContextMenuDelegate () @interface MPAddCustomFieldContextMenuDelegate ()
@property (readonly, nonatomic) KPKEntry *entry; @property (readonly, nonatomic) KPKEntry *entry;
@end @end
@@ -32,7 +41,6 @@ NSString *const MPHMACOTPConfigAttributeKey = @"HMACOTP-Config";
} }
- (void)_setupHOTPMenuItemsToMenu:(NSMenu *)menu { - (void)_setupHOTPMenuItemsToMenu:(NSMenu *)menu {
BOOL hasConfigAttribute = nil != [self.entry customAttributeWithKey:MPHMACOTPConfigAttributeKey]; BOOL hasConfigAttribute = nil != [self.entry customAttributeWithKey:MPHMACOTPConfigAttributeKey];
if(!hasConfigAttribute) { if(!hasConfigAttribute) {
NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:@"Add config" action:@selector(_addHMACConfig:) keyEquivalent:@""]; NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:@"Add config" action:@selector(_addHMACConfig:) keyEquivalent:@""];