Hackage.Security.Key.Env

hackage-security-0.5.3.0: Hackage security library

Safe Haskell | None
Language | Haskell2010

Hackage.Security.Key.Env

Contents

- Convenience constructors
- The usual accessors

Synopsis

- data KeyEnv
- keyEnvMap :: KeyEnv -> Map KeyId (Some PublicKey)
- fromPublicKeys :: [Some PublicKey] -> KeyEnv
- fromKeys :: [Some Key] -> KeyEnv
- empty :: KeyEnv
- null :: KeyEnv -> Bool
- insert :: Some PublicKey -> KeyEnv -> KeyEnv
- lookup :: KeyId -> KeyEnv -> Maybe (Some PublicKey)
- union :: KeyEnv -> KeyEnv -> KeyEnv

# Documentation

data KeyEnv #

A key environment is a mapping from key IDs to the corresponding keys.

It should satisfy the invariant that these key IDs actually match the keys; see `checkKeyEnvInvariant`.

Instances

Show KeyEnv # |
Instance details Defined in Hackage.Security.Key.Env Methods showsPrec :: Int -> KeyEnv -> ShowS # show :: KeyEnv -> String # showList :: [KeyEnv] -> ShowS #
ReportSchemaErrors m => FromJSON m KeyEnv # |
Instance details Defined in Hackage.Security.Key.Env Methods fromJSON :: JSValue -> m KeyEnv #
Monad m => ToJSON m KeyEnv # |
Instance details Defined in Hackage.Security.Key.Env Methods toJSON :: KeyEnv -> m JSValue #

keyEnvMap :: KeyEnv -> Map KeyId (Some PublicKey) #

# Convenience constructors

fromPublicKeys :: [Some PublicKey] -> KeyEnv #

fromKeys :: [Some Key] -> KeyEnv #

# The usual accessors

empty :: KeyEnv #

null :: KeyEnv -> Bool #

insert :: Some PublicKey -> KeyEnv -> KeyEnv #

lookup :: KeyId -> KeyEnv -> Maybe (Some PublicKey) #

union :: KeyEnv -> KeyEnv -> KeyEnv #