eap 0.7.0.0 → 0.8.0.0
raw patch · 2 files changed
+4/−4 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- eap.cabal +1/−1
- src/Network/EAP/Authentication.hs +3/−3
eap.cabal view
@@ -1,5 +1,5 @@ name: eap-version: 0.7.0.0+version: 0.8.0.0 synopsis: Extensible Authentication Protocol (EAP) description: This module provides types and on the wire de/coding of EAP packets as per RFC 3748 homepage: https://github.com/erickg/eap#readme
src/Network/EAP/Authentication.hs view
@@ -44,7 +44,7 @@ authenticateMSCHAPv2 :: MSCHAPv2Data -- ^ Decoded data from the MSCHAPv2 response -> ByteString -- ^ Authenticator challenge sent to the peer on a previous request- -> SB.ByteString -- ^ Authenticating user password NT hash (MD4)+ -> ByteString -- ^ Authenticating user password NT hash (MD4) -> Except CryptoError Bool -- ^ Returns either an error from one of the encryption -- routines or a boolean indicating whether the user -- response matches the expected value@@ -65,13 +65,13 @@ -- request -> ByteString -- ^ Challenge sent back by authenticating peer -> ByteString -- ^ MSCHAP username- -> SB.ByteString -- ^ NT hash (MD4) of user password+ -> ByteString -- ^ NT hash (MD4) of user password -> Except CryptoError SB.ByteString -- ^ Returns either an error from one of -- the encryption routines or the -- calculated NT response generateNTResponse authenticatorChallenge peerChallenge username passwordHash = do let challenge = challengeHash peerChallenge authenticatorChallenge username- zPasswordHash = passwordHash `SB.append` SB.replicate 5 0 -- pad to 21 octets+ zPasswordHash = (toStrict passwordHash) `SB.append` SB.replicate 5 0 -- pad to 21 octets (pHash0, rest) = SB.splitAt 7 zPasswordHash (pHash1, pHash2) = SB.splitAt 7 rest r0 <- encryptDES pHash0 challenge