Skip to content

cl04/ou-parser-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ou-parser-test

a parser test

Data format to be parsed:

data HashAlg = SHA256
             | SHA384
             deriving Show

data OU = OUApplicationId Int64
        | OUHashAlg       HashAlg
        | OUSerialNumbers [Int32]
        | OUAllowsExec    Bool

-- "01 xxxxxxxxxxxxxxxx APPID"        <-> OUApplicationId Int64
-- "02 01 SHA256"                     <-> OUHashAlg SHA256
-- "02 01 SHA384"                     <-> OUHashAlg SHA384
-- "03 xxxxxxxx yyyyyyyy zzzzzzzz SN" <-> OUSerialNumbers [Int32]
-- "04 01 EXEC"                       <-> OUAllowsExec Bool

write two functions:

read :: String -> OU show :: OU -> String

to parse or show the data.

About

a parser test

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages