GitHub

API reference for Crypto.

JavaScript's globalThis.crypto: subtle is None where there is none (as in a browser's insecure context).

Attributes

AttributeTypeDescription
subtleSubtleCrypto | None

Functions

get_random_values

get_random_values(array) -> memoryview

Fill array with secure random bytes and return it. At most 65,536 bytes per call, as in Web Crypto.

ParameterTypeDescription
arraymemoryview

Returns memoryview

def get_random_values(self, array: memoryview, /) -> memoryview:
    """Fill ``array`` with secure random bytes and return it. At most
    65,536 bytes per call, as in Web Crypto."""
    ...