xlsx-1.1.0.1: Simple and incomplete Excel file parser/writer
Safe HaskellSafe-Inferred
LanguageHaskell2010

Codec.Xlsx.Types.Protection

Contents

Synopsis

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

Instances details
Generic SheetProtection Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

Associated Types

type Rep SheetProtection :: Type -> Type #

Show SheetProtection Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

NFData SheetProtection Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

Methods

rnf :: SheetProtection -> () #

Eq SheetProtection Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

FromCursor SheetProtection Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

FromXenoNode SheetProtection Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

ToElement SheetProtection Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

type Rep SheetProtection Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

type Rep SheetProtection = D1 ('MetaData "SheetProtection" "Codec.Xlsx.Types.Protection" "xlsx-1.1.0.1-FKUF1Jx3xuq9irRu3xJWCs" 'False) (C1 ('MetaCons "SheetProtection" 'PrefixI 'True) ((((S1 ('MetaSel ('Just "_sprLegacyPassword") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe LegacyPassword)) :*: S1 ('MetaSel ('Just "_sprSheet") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "_sprAutoFilter") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "_sprDeleteColumns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) :*: ((S1 ('MetaSel ('Just "_sprDeleteRows") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "_sprFormatCells") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "_sprFormatColumns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "_sprFormatRows") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))) :*: (((S1 ('MetaSel ('Just "_sprInsertColumns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "_sprInsertHyperlinks") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "_sprInsertRows") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "_sprObjects") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) :*: ((S1 ('MetaSel ('Just "_sprPivotTables") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "_sprScenarios") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "_sprSelectLockedCells") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "_sprSelectUnlockedCells") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "_sprSort") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))))))

fullSheetProtection :: SheetProtection Source #

protection of all sheet features which could be protected

noSheetProtection :: SheetProtection Source #

no sheet protection at all

data LegacyPassword Source #

Instances

Instances details
Generic LegacyPassword Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

Associated Types

type Rep LegacyPassword :: Type -> Type #

Show LegacyPassword Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

NFData LegacyPassword Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

Methods

rnf :: LegacyPassword -> () #

Eq LegacyPassword Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

FromAttrVal LegacyPassword Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

FromAttrBs LegacyPassword Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

ToAttrVal LegacyPassword Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

type Rep LegacyPassword Source # 
Instance details

Defined in Codec.Xlsx.Types.Protection

type Rep LegacyPassword = D1 ('MetaData "LegacyPassword" "Codec.Xlsx.Types.Protection" "xlsx-1.1.0.1-FKUF1Jx3xuq9irRu3xJWCs" '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)

Lenses