Skip to content

Instantly share code, notes, and snippets.

@pv8
Last active December 15, 2017 17:17

Revisions

  1. Pablo revised this gist Dec 15, 2017. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    ## Generating seed via command line

    ```sh
    $ curl -s https://gist.githubusercontent.com/pv8/9c509a8ebcb3de1e7ceb8ea5d02e6f23/raw/152a24f470c96643180e6faded4c77b1c737e1d7/iota_seed_gen.py | python3
    ```
  2. Pablo created this gist Dec 15, 2017.
    10 changes: 10 additions & 0 deletions iota_seed_gen.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    #!/usr/bin/env python3

    from random import SystemRandom

    LENGTH = 81

    alphabet = b'9ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    sys_random = SystemRandom()

    print(''.join([chr(sys_random.choice(alphabet)) for _ in range(LENGTH)]))