示例#1
0
def sodium_init():
    """
    Initializes sodium, picking the best implementations available for this
    machine.
    """
    if lib.sodium_init() != 0:
        raise CryptoError("Could not initialize sodium")
示例#2
0
def _sodium_init():
    ensure(
        lib.sodium_init() != -1,
        "Could not initialize sodium",
        raising=exc.RuntimeError,
    )
示例#3
0
def _sodium_init():
    ensure(lib.sodium_init() != -1,
           "Could not initialize sodium",
           raising=exc.RuntimeError)