Skip to content

Commit

Permalink
codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
mstarke committed Oct 20, 2021
1 parent 17429df commit 5a15870
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions KeePassKit/Cryptography/KPKHmacOTPGenerator.m
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,12 @@ - (BOOL)_parseAttributes:(NSArray <KPKAttribute*>*)attributes {
}

- (void)saveToEntry:(KPKEntry *)entry {
/**
/*
strategy ist to add a otp attribute regardless of the current state
update or add KeePass native settings regardless of current state
This leads to entries having at least the otp and the native settings
*/


NSString *urlString = [NSURL URLWithHmacOTPKey:self.key algorithm:self.hashAlgorithm issuer:[self _issuerForEntry:entry] counter:self.counter digits:self.numberOfDigits].absoluteString;
KPKAttribute *urlAttribute = [entry attributeWithKey:kKPKAttributeKeyOTPOAuthURL];
/* update or create the URL attribute */
Expand All @@ -145,9 +143,7 @@ - (void)saveToEntry:(KPKEntry *)entry {
urlAttribute.value = urlString;
}


/* HTOP Settings */

KPKAttribute *asciiKeyAttribute = [entry attributeWithKey:kKPKAttributeKeyHmacOTPSecret];
KPKAttribute *hexKeyAttribute = [entry attributeWithKey:kKPKAttributeKeyHmacOTPSecretHex];
KPKAttribute *base32KeyAttribute = [entry attributeWithKey:kKPKAttributeKeyHmacOTPSecretBase32];
Expand Down

0 comments on commit 5a15870

Please sign in to comment.