Coherence
Search…
Rand
spec

How to ???

1
#!/usr/bin/env python
2
3
import requests
4
import json
5
import os,binascii
6
7
def sending(message):
8
url = 'http://127.0.0.1:6613/'
9
response=requests.post(url, data=message)
10
print response.content
11
12
data_js='{"version":1,"algorithm":"RAND_RP","length":12}'
13
sending(data_js)
Copied!
In this example we generate 12 random bytes with RAND_RP algorithm without entropy.
    On data_js["algorithm"] can be one of {RAND_RP, RAND_AUTO, RAND_RDRAND}
To add entropy we need to the parameter "entropy": INT
    0 means with entropy using /dev/urandom
    1 means with entropy using /dev/random
    2 means without entropy
Json to rand
1
{"version":1,"algorithm":"rand flavor","length":INT ,"entropy":INT}
Copied!
Copy link
Contents
How to ???