Copyright | © 2018-2021 IOHK |
---|---|
License | Apache-2.0 |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- newtype Passphrase (purpose :: Symbol ) = Passphrase { }
-
class
PassphraseMinLength
(purpose ::
Symbol
)
where
- passphraseMinLength :: Proxy purpose -> Int
-
class
PassphraseMaxLength
(purpose ::
Symbol
)
where
- passphraseMaxLength :: Proxy purpose -> Int
- validatePassphrase :: forall purpose. ( PassphraseMaxLength purpose, PassphraseMinLength purpose) => Text -> Either String ( Passphrase purpose)
- newtype PassphraseHash = PassphraseHash { }
- data PassphraseScheme
- data WalletPassphraseInfo = WalletPassphraseInfo { }
- data ErrWrongPassphrase
Passphrases from the user
newtype Passphrase (purpose :: Symbol ) Source #
An encapsulated passphrase. The inner format is free, but the wrapper helps readability in function signatures.
Some type parameters in use are:
-
"user"
- a passphrase entered by the user through the API. TheFromText
instance enforces password length rules. -
"lenient"
- like"user"
, except without a minimum length restriction inFromText
.` -
"encryption"
- the user's passphrase, transformed so that it can be used as the key for encrypting wallet keys. -
"salt"
- the random salt part of a hashed passphrase.
Instances
class PassphraseMinLength (purpose :: Symbol ) where Source #
passphraseMinLength :: Proxy purpose -> Int Source #
Minimal Length for a passphrase, for lack of better validations
Instances
PassphraseMinLength "lenient" Source # | |
Defined in Cardano.Wallet.Primitive.Passphrase.Types passphraseMinLength :: Proxy "lenient" -> Int Source # |
|
PassphraseMinLength "user" Source # | |
Defined in Cardano.Wallet.Primitive.Passphrase.Types passphraseMinLength :: Proxy "user" -> Int Source # |
class PassphraseMaxLength (purpose :: Symbol ) where Source #
passphraseMaxLength :: Proxy purpose -> Int Source #
Maximum length for a passphrase
Instances
PassphraseMaxLength "lenient" Source # | |
Defined in Cardano.Wallet.Primitive.Passphrase.Types passphraseMaxLength :: Proxy "lenient" -> Int Source # |
|
PassphraseMaxLength "user" Source # | |
Defined in Cardano.Wallet.Primitive.Passphrase.Types passphraseMaxLength :: Proxy "user" -> Int Source # |
validatePassphrase :: forall purpose. ( PassphraseMaxLength purpose, PassphraseMinLength purpose) => Text -> Either String ( Passphrase purpose) Source #
Wallet passphrases stored as hashes
newtype PassphraseHash Source #
Instances
data PassphraseScheme Source #
A type to capture which encryption scheme should be used
EncryptWithScrypt |
Legacy encryption scheme for passphrases |
EncryptWithPBKDF2 |
Encryption scheme used since cardano-wallet |
Instances
data WalletPassphraseInfo Source #
Instances
Error types
data ErrWrongPassphrase Source #
Indicate a failure when checking for a given
Passphrase
match