License | MIT |
---|---|
Maintainer | Francis Lim <thyeem@gmail.com> |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- bruteforce :: Int -> String -> String -> Hasher -> Maybe String
- bruteforceDeep :: String -> String -> Hasher -> Maybe String
- bruteforcePar :: Int -> [ByteString] -> ByteString -> Hasher -> ByteString -> Maybe String
- (<%>) :: (NFData a, NFData b) => (a -> b) -> [a] -> [b]
- image :: String -> ByteString
- byteChars :: String -> [ByteString]
- bytePrefixes :: Int -> String -> [ByteString]
Documentation
bruteforce :: Int -> String -> String -> Hasher -> Maybe String Source #
Brute-force search only for a given exact length
+----------+----------------------------------------------------------------------+ | size | Preimage length to search | +----------+----------------------------------------------------------------------+ | chars | Given character set like "0123456789" | +----------+----------------------------------------------------------------------+ | hex | Given hex-string like "17da1ae431f965d839ec8eb93087fb2b" | +----------+----------------------------------------------------------------------+ | hasher | Hash functions inHasher
module. Get it usinggetHasher
| +----------+----------------------------------------------------------------------+ | numBind | Number of bound variables defined by search length and prefix size | +----------+----------------------------------------------------------------------+ | runPar | A partially applied function for parallel execution | +----------+----------------------------------------------------------------------+ | prefixes | All possible combinations of given prefix characters. | | | The search space is equally partitioned based on these prefixes. | | | length of prefixes == number of sparks | +----------+----------------------------------------------------------------------+
bruteforceDeep :: String -> String -> Hasher -> Maybe String Source #
Incrementally searches without knowing the exact length of search
See the bruteforce
function for the arguments used
bruteforcePar :: Int -> [ByteString] -> ByteString -> Hasher -> ByteString -> Maybe String Source #
Pick up an appropriate search function
Returns a partial application corresponding to the given numBind
(<%>) :: (NFData a, NFData b) => (a -> b) -> [a] -> [b] Source #
Parallel map using deepseq, par and pseq
Type of any argument in this map should be an instance of NFData
.
image :: String -> ByteString Source #
Image bytestring: target hash value to find
byteChars :: String -> [ByteString] Source #
Bytestring usable for preimage
bytePrefixes :: Int -> String -> [ByteString] Source #
Combination of prefixes possible: size of (length of chars) ^ (numPrefix)