Popularity
1.8
Growing
Activity
0.0
Stable
8
1
1

Description

Brute is a package that generates combinations of various characters.

Monthly Downloads: 41
Programming language: Elixir
License: MIT License
Tags: Cryptography     Data     Streams    
Latest version: v0.1.0

Brute alternatives and similar packages

Based on the "Cryptography" category

Do you think we are missing an alternative of Brute or a related project?

Add another 'Cryptography' Package

README

Brute

Documentation

Brute is a package that generates combinations of various characters.

For example, Brute can generate the combinations for the set {a b c}:

Brute.generic(?a..?c, 1..3)

Will generate something similar to the following: a, b , c, ..., z, aa, ab, ..., zy, zz, ... aaa, aab, ..., zzy, zzz.

There is no order guarantee within set-length.

Since most functions in Brute return a stream, they can combined with other operations. For example, calculating a hash:

'abcdefghijkpqrstuvwxyzABCDEFGHIJKPQRSTUVWXYZ0123456789`~!@#$%^&*()_+{}:<>?"\'`'
|> Brute.generic(1..20)
|> Stream.map(fn str ->
  :crypto.hash(:sha, str) |> Base.encode16
end)

Installation

def deps do
  [{:brute, "~> 0.1.0"}]
end

If you are using Elixir 1.3 or lower you will also need to add brute to your applications.

def application do
  [ ... applications: [ ..., :brute ] ]
end

TODO

  • [ ] Benchmarks
  • [ ] Caching combinations