| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Codec.Xlsx.Types.Protection
Contents
Synopsis
- data SheetProtection = SheetProtection {
- _sprLegacyPassword :: Maybe LegacyPassword
- _sprSheet :: Bool
- _sprAutoFilter :: Bool
- _sprDeleteColumns :: Bool
- _sprDeleteRows :: Bool
- _sprFormatCells :: Bool
- _sprFormatColumns :: Bool
- _sprFormatRows :: Bool
- _sprInsertColumns :: Bool
- _sprInsertHyperlinks :: Bool
- _sprInsertRows :: Bool
- _sprObjects :: Bool
- _sprPivotTables :: Bool
- _sprScenarios :: Bool
- _sprSelectLockedCells :: Bool
- _sprSelectUnlockedCells :: Bool
- _sprSort :: Bool
- fullSheetProtection :: SheetProtection
- noSheetProtection :: SheetProtection
- data LegacyPassword
- legacyPassword :: Text -> LegacyPassword
- sprLegacyPassword :: Lens' SheetProtection (Maybe LegacyPassword)
- sprSheet :: Lens' SheetProtection Bool
- sprObjects :: Lens' SheetProtection Bool
- sprScenarios :: Lens' SheetProtection Bool
- sprFormatCells :: Lens' SheetProtection Bool
- sprFormatColumns :: Lens' SheetProtection Bool
- sprFormatRows :: Lens' SheetProtection Bool
- sprInsertColumns :: Lens' SheetProtection Bool
- sprInsertRows :: Lens' SheetProtection Bool
- sprInsertHyperlinks :: Lens' SheetProtection Bool
- sprDeleteColumns :: Lens' SheetProtection Bool
- sprDeleteRows :: Lens' SheetProtection Bool
- sprSelectLockedCells :: Lens' SheetProtection Bool
- sprSort :: Lens' SheetProtection Bool
- sprAutoFilter :: Lens' SheetProtection Bool
- sprPivotTables :: Lens' SheetProtection Bool
- sprSelectUnlockedCells :: Lens' SheetProtection Bool
Documentation
data SheetProtection Source #
Sheet protection options to enforce and specify that it needs to be protected
TODO: algorithms specified in the spec with hashes, salts and spin counts
See 18.3.1.85 "sheetProtection (Sheet Protection Options)" (p. 1694)
Constructors
| SheetProtection | |
Fields
| |
Instances
fullSheetProtection :: SheetProtection Source #
protection of all sheet features which could be protected
noSheetProtection :: SheetProtection Source #
no sheet protection at all
data LegacyPassword Source #
Instances
| NFData LegacyPassword Source # | |||||
Defined in Codec.Xlsx.Types.Protection Methods rnf :: LegacyPassword -> () Source # | |||||
| Generic LegacyPassword Source # | |||||
Defined in Codec.Xlsx.Types.Protection Associated Types
Methods from :: LegacyPassword -> Rep LegacyPassword x Source # to :: Rep LegacyPassword x -> LegacyPassword Source # | |||||
| Show LegacyPassword Source # | |||||
Defined in Codec.Xlsx.Types.Protection | |||||
| Eq LegacyPassword Source # | |||||
Defined in Codec.Xlsx.Types.Protection Methods (==) :: LegacyPassword -> LegacyPassword -> Bool Source # (/=) :: LegacyPassword -> LegacyPassword -> Bool Source # | |||||
| FromAttrVal LegacyPassword Source # | |||||
Defined in Codec.Xlsx.Types.Protection Methods | |||||
| FromAttrBs LegacyPassword Source # | |||||
Defined in Codec.Xlsx.Types.Protection Methods fromAttrBs :: ByteString -> Either Text LegacyPassword Source # | |||||
| ToAttrVal LegacyPassword Source # | |||||
Defined in Codec.Xlsx.Types.Protection Methods toAttrVal :: LegacyPassword -> Text Source # | |||||
| type Rep LegacyPassword Source # | |||||
Defined in Codec.Xlsx.Types.Protection type Rep LegacyPassword = D1 ('MetaData "LegacyPassword" "Codec.Xlsx.Types.Protection" "xlsx-1.1.4-G0KawmQS4mL8oRGRTaTy8Y" 'True) (C1 ('MetaCons "LegacyPassword" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) | |||||
legacyPassword :: Text -> LegacyPassword Source #
Creates legacy XOR hashed password.
Note: The implementation is known to work only for ASCII symbols, if you know how to encode properly others - an email or a PR will be highly apperciated
See Part 4, 14.7.1 "Legacy Password Hash Algorithm" (p. 73) and Part 4, 15.2.3 "Additional attributes for workbookProtection element (Part 1, §18.2.29)" (p. 220) and Par 4, 15.3.1.6 "Additional attribute for sheetProtection element (Part 1, §18.3.1.85)" (p. 229)