Skip to content

optimizing pass phrase match check / decrypt sequence #362

Description

@tomholub

We pass array of keys [key1-longid1, key2-longid2, key3-longid3] to parse parseDecryptMsg in

let decrypted = try self.core.parseDecryptMsg(
                encrypted: rawMimeData,
                keys: keys,
                msgPwd: nil,
                isEmail: true
)

If I get longid for the key which was used to decrypt a message I can save PassPhrase with proper longid here

keys
  .map { PassPhrase(value: passPhrase, longid: $0.longid) }
  .forEach { self.passPhraseStorage.savePassPhrase(with: $0, inStorage: false) }

Actually it's the same question as below - are there any possibility to check that entered pass phrase is matching particular key before I try to decrypt a message and check the error?

Originally posted by @Kharchevskyi in #323 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions