How to use the randomgen.ChaCha function in randomgen

To help you get started, we’ve selected a few randomgen examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bashtage / randomgen / doc / source / performance.py View on Github external
PCG64DXSM,
    RDRAND,
    SFC64,
    SFMT,
    SPECK128,
    AESCounter,
    ChaCha,
    Philox,
    Romu,
    ThreeFry,
    Xoshiro256,
    Xoshiro512,
)


class ChaCha8(ChaCha):
    canonical_repr = "ChaCha(rounds=8)"

    def __init__(self, *args, **kwargs):
        if "rounds" in kwargs:
            del kwargs["rounds"]
        super().__init__(*args, rounds=8, **kwargs)


class JSF32(JSF):
    def __init__(self, *args, **kwargs):
        if "size" in kwargs:
            del kwargs["size"]
        super().__init__(*args, size=32, **kwargs)


class Philox4x32(Philox):
github bashtage / randomgen / tools / configuration.py View on Github external
SFC64,
    SFMT,
    SPECK128,
    AESCounter,
    ChaCha,
    LCG128Mix,
    Philox,
    Romu,
    ThreeFry,
    Xoshiro256,
    Xoshiro512,
)

ALL_BIT_GENS = [
    AESCounter,
    ChaCha,
    DSFMT,
    EFIIX64,
    HC128,
    JSF,
    LXM,
    PCG64,
    LCG128Mix,
    MT19937,
    Philox,
    SFC64,
    SFMT,
    SPECK128,
    ThreeFry,
    Xoshiro256,
    Xoshiro512,
    Romu,
github bashtage / randomgen / doc / source / performance.py View on Github external
ChaCha8,
    JSF32,
    Philox4x32,
    ThreeFry2x64,
    ThreeFry4x32,
    Philox2x64,
    DSFMT,
    MT64,
    MT19937,
    PCG64,
    PCG64DXSM128,
    PCG64DXSM,
    LXM,
    SFMT,
    AESCounter,
    ChaCha,
    Philox,
    ThreeFry,
    Xoshiro256,
    Xoshiro512,
    JSF,
    Romu,
    RomuTrio,
    HC128,
    SPECK128,
    SFC64,
    EFIIX64,
]

if HAS_RDRND:
    PRNGS.append(RDRAND)