cardano-wallet-core-2022.7.1: The Wallet Backend for a Cardano node.
Copyright © 2018-2021 IOHK
License Apache-2.0
Safe Haskell None
Language Haskell2010

Cardano.Wallet.Primitive.Passphrase.Legacy

Description

Support for verifying hashed passwords from the old wallet codebase.

These passwords were encrypted by the scrypt package using the following parameters: - logN = 14 - r = 8 - p = 1 - outputLength = 64

It is possible to disable support for legacy password hashing by compiling with the -scrypt Cabal flag.

Synopsis

Legacy passphrases

checkPassphrase :: Passphrase "encryption" -> PassphraseHash -> Maybe Bool Source #

Verify a wallet spending password using the legacy Byron scrypt encryption scheme.

Testing-only scrypt password implementation

checkPassphraseTestingOnly :: Passphrase "encryption" -> PassphraseHash -> Bool Source #

This is for use by test cases only. Use only the implementation from the scrypt package for application code.

encryptPassphraseTestingOnly :: MonadRandom m => Passphrase "encryption" -> m PassphraseHash Source #

This is for use by test cases only.

Testing-only helper

Internal functions

getSalt :: PassphraseHash -> Maybe ( Passphrase "salt") Source #

Extract salt field from pipe-delimited password hash. This will fail unless there are exactly 5 fields