Parallel brute force: Difference between revisions
Content added Content deleted
(added Haskell) |
|||
Line 744: | Line 744: | ||
</pre> |
</pre> |
||
=={{header|Haskell}}== |
=={{header|Haskell}}== |
||
Uses libraries: |
|||
<ul> |
|||
<li>cryptonite</li> |
|||
<li>monad-par</li> |
|||
<li>bytestring</li> |
|||
<li>text</li> |
|||
<li>split</li> |
|||
</ul> |
|||
<br/> |
|||
<lang haskell>{-# LANGUAGE OverloadedStrings #-} |
<lang haskell>{-# LANGUAGE OverloadedStrings #-} |
||
⚫ | |||
⚫ | |||
import Crypto.Hash (hashWith, SHA256 (..), Digest, digestFromByteString) |
import Crypto.Hash (hashWith, SHA256 (..), Digest, digestFromByteString) |
||
import Control.Monad (replicateM, join) |
import Control.Monad (replicateM, join) |
||
⚫ | |||
import Control.Monad.Par (runPar, get, spawnP) |
import Control.Monad.Par (runPar, get, spawnP) |
||
⚫ | |||
⚫ | |||
⚫ | |||
import Text.Printf (printf) |
import Text.Printf (printf) |
||
Line 784: | Line 793: | ||
1115dd800feaacefdf481f1f9070374a2a81e27880f187396db67958b207cbad -> zyzzx |
1115dd800feaacefdf481f1f9070374a2a81e27880f187396db67958b207cbad -> zyzzx |
||
</pre> |
</pre> |
||
=={{header|Java}}== |
=={{header|Java}}== |
||
{{works with |Java| 1.5}} |
{{works with |Java| 1.5}} |