crypto-enigma 0.0.2.0 → 0.0.2.1
raw patch · 5 files changed
+20/−7 lines, 5 filesbinary-addedPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +7/−0
- Crypto/Enigma.hs +3/−2
- Crypto/Enigma/Display.hs +6/−2
- crypto-enigma.cabal +4/−3
- figs/configinternal.jpg binary
CHANGELOG.md view
@@ -1,5 +1,10 @@ See also: the list of [code releases] and [closed milestones]. +### [0.0.2.1]++* Add [test figure] to documentation.+* Minor corrections to documentation.+ ### [0.0.2.0] * Start testing module.@@ -31,9 +36,11 @@ without ([successful](https://hackage.haskell.org/package/crypto-enigma-0.0.1.3/reports/1)) Hacakge-built documentation. Stable enough for use, but not reviewed. +[test figure]: https://hackage.haskell.org/package/crypto-enigma/docs/Crypto-Enigma-Display.html#showEnigmaConfigInternalFIG [build checks]: https://travis-ci.org/orome/crypto-enigma/branches [code releases]: https://github.com/orome/crypto-enigma/releases [closed milestones]: https://github.com/orome/crypto-enigma/milestones?state=closed+[0.0.2.1]: https://github.com/orome/crypto-enigma/releases/tag/0.0.2.1 [0.0.2.0]: https://github.com/orome/crypto-enigma/releases/tag/0.0.2.0 [0.0.1.7]: https://github.com/orome/crypto-enigma/releases/tag/0.0.1.7 [0.0.1.6]: https://github.com/orome/crypto-enigma/releases/tag/0.0.1.6
Crypto/Enigma.hs view
@@ -1,4 +1,5 @@ {-# OPTIONS_HADDOCK show-extensions #-}+--{-# OPTIONS_GHC -fno-ignore-asserts #-} -- REV - Use to keep asserts for valid 'Message'? <<< {-| Module : Crypto.Enigma Description : Enigma machine simulator@@ -471,11 +472,11 @@ enigmaMapping ec = last $ enigmaMappingList ec -- The final stage's progressive encoding -- TBD - Keep? Not enforced except by assertion in 'enigmaEncoding', and by substitution of ' ' in showEnigmaConfigS--- BUG - Why does this assertion seem to pass and generate an out of bounds error with e.g., '.' in a msg? <<< -- | A valid keyboard entry into an Enigma machine: a string of uppercase characters. type Message = String --- REV -- Move preprocessing back; move assertion out?+-- TBD - Either keep assertion enabled or replace with if/else or other enforcement or check <<<+-- REV - Move preprocessing back; move assertion out? -- | Encode a 'Message' using a given (starting) machine configuration, by 'step'ping the configuration prior to -- processing each character of the message. This produces a new configuration (with new 'positions' only) -- for encoding each character, which serves as the "starting" configuration for subsequent
Crypto/Enigma/Display.hs view
@@ -117,7 +117,7 @@ lbl = if ch == ' ' then " " else ch:" >" ps' = unwords $ (printf "%02d") <$> ps --- TBD - Add figure from MMA tool showing mapping+-- TBD - Improve resolution of figure showing mapping <<< -- | Display a summary of the Enigma machine configuration as a schematic showing the encoding (see 'Mapping') -- performed by each stage (see 'stageMappingList'), along with an indication of the stage -- (rotor number, @\"P\"@ for plugboard, or @\"R\"@ for reflector), window letter (see 'windows'),@@ -168,11 +168,15 @@ -- to __@\'Q\'@__, which is then -- * encoded in reverse by the first rotor (@\'1\'@), -- to __@\'G\'@__, which is then--- * encoded left unchainged by the plugboard (@\'P\'@), and finally+-- * left unchanged by the plugboard (@\'P\'@), and finally -- * displayed as __@\'G\'@__ -- -- Note that (as follows from 'Mapping') the position of the marked letter at each stage is the alphabetic position -- of the marked letter at the previous stage.+--+-- This can be represented schematically (with input arriving and outupt exiting on the right) as #showEnigmaConfigInternalFIG#+--+-- <<figs/configinternal.jpg>> showEnigmaConfigInternal :: EnigmaConfig -> Char -> String showEnigmaConfigInternal ec ch = unlines $ [fmt (if ch' == ' ' then "" else ch':" >") (markedMapping (head charLocs) letters) ' ' 0 ""] ++
crypto-enigma.cabal view
@@ -3,7 +3,7 @@ -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change-version: 0.0.2.0+version: 0.0.2.1 synopsis: An Enigma machine simulator with display. description: The crypto-enigma package is an Enigma machine simulator with rich display and machine state details.@@ -23,7 +23,7 @@ (Note that this package assumes support for combining Unicode, without which some output may appear garbled.) homepage: https://github.com/orome/crypto-enigma-bug-reports: https://github.com/orome/crypto-enigma/issues+bug-reports: https://github.com/orome/crypto-enigma/issues license: BSD3 license-file: LICENSE author: Roy Levien@@ -33,6 +33,7 @@ build-type: Simple extra-source-files: CHANGELOG.md README.md+extra-doc-files: figs/*.jpg cabal-version: >=1.22 source-repository head@@ -44,7 +45,7 @@ type: git location: git://github.com/orome/crypto-enigma.git branch: hackage- tag: 0.0.2.0+ tag: 0.0.2.1 library -- default-extensions: Trustworthy
+ figs/configinternal.jpg view
binary file changed (absent → 266711 bytes)