Skip to content

refactor testing pass phrase match when enterpring temporary pp #361

Description

@tomholub

what does it do?


entered pass phrase gets tested against stored keys on this account. It must be able to decrypt at least one key. If it works for at least one, then save it temporarily for use only with that one key.

basically this. Here it creates an array of keys with entered pass phrase

Originally posted by @Kharchevskyi in #323 (comment)

    // append keys to ensure with a pass phrase
        if let passPhrase = passPhrase {
            let keysToEnsure = keysInfo.map {
                PrvKeyInfo(
                    private: $0.private,
                    longid: $0.longid,
                    passphrase: passPhrase
                )
            }

            privateKeys.append(contentsOf: keysToEnsure)

This code should be reworked for clarity

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

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions