pylibressl.utils

Miscellaneous useful utilities from LibreSSL.

Module Contents

Functions

secure_compare(rhs, lhs)

Securely compare byte strings.

pylibressl.utils.secure_compare(rhs, lhs)

Securely compare byte strings.

Constant-time comparison of byte strings using CRYPTO_memcmp from LibreSSL. Note that when byte string lengths are different, exception is raised at once.