Welcome to jaraco.crypto documentation!#

class jaraco.crypto.cert.BIO#

Bases: Structure

callback#

Structure/Union member

cb_arg#

Structure/Union member

ex_data#

Structure/Union member

flags#

Structure/Union member

init#

Structure/Union member

method#

Structure/Union member

next_bio#

Structure/Union member

num#

Structure/Union member

num_read#

Structure/Union member

num_write#

Structure/Union member

prev_bio#

Structure/Union member

ptr#

Structure/Union member

references#

Structure/Union member

retry_reason#

Structure/Union member

shutdown#

Structure/Union member

class jaraco.crypto.cert.CRYPTO_EX_DATA#

Bases: Structure

dummy#

Structure/Union member

sk#

Structure/Union member

class jaraco.crypto.cert.Stack#

Bases: Structure

comp#

Structure/Union member

data#

Structure/Union member

num#

Structure/Union member

num_alloc#

Structure/Union member

sorted#

Structure/Union member

class jaraco.crypto.cert.X509#

Bases: Structure

get_serial_number()#
jaraco.crypto.cert.load_certificate(type, data)#
class jaraco.crypto.cipher.Cipher(*a, **kw)#

Bases: Structure

app_data#

Structure/Union member

block_mask#

Structure/Union member

buf#

Structure/Union member

buf_len#

Structure/Union member

cipher#

Structure/Union member

cipher_data#

Structure/Union member

encrypt#

Structure/Union member

engine#

Structure/Union member

final#

Structure/Union member

final_used#

Structure/Union member

finalize(data=None)#
finalized = False#
flags#

Structure/Union member

static interpret_type(type)#
iv#

Structure/Union member

key_len#

Structure/Union member

num#

Structure/Union member

oiv#

Structure/Union member

set_padding(padding=True)#
update(data)#

From docs: EVP_EncryptUpdate() encrypts inl bytes from the buffer in and writes the encrypted version to out. This function can be called multiple times to encrypt successive blocks of data. The amount of data written depends on the block alignment of the encrypted data: as a result the amount of data written may be anything from zero bytes to (inl + cipher_block_size - 1) so outl should contain sufficient room. The actual number of bytes written is placed in outl.

exception jaraco.crypto.cipher.CipherError#

Bases: Exception

class jaraco.crypto.cipher.CipherType#

Bases: Structure

app_data#

Structure/Union member

block_size#

Structure/Union member

cleanup#

Structure/Union member

ctrl#

Structure/Union member

ctx_size#

Structure/Union member

do_cipher#

Structure/Union member

flags#

Structure/Union member

classmethod from_name(*cipher_name)#

Create a CipherType from a cipher name.

Takes one or two parameters. If one is supplied, it should be a dash-separated string of algorithm-mode. If two are supplied, they should be the algorithm and mode.

get_asn1_parameters#

Structure/Union member

init#

Structure/Union member

iv_len#

Structure/Union member

key_len#

Structure/Union member

nid#

Structure/Union member

set_asn1_parameters#

Structure/Union member

class jaraco.crypto.digest.Digest(*a, **kw)#

Bases: Structure

digest(data=None)#
engine#

Structure/Union member

finalized = False#
flags#

Structure/Union member

md_data#

Structure/Union member

p_type#

Structure/Union member

pctx#

Structure/Union member

update(data)#
update_func#

Structure/Union member

exception jaraco.crypto.digest.DigestError#

Bases: Exception

class jaraco.crypto.digest.DigestType#

Bases: Structure

block_size#

Structure/Union member

cleanup#

Structure/Union member

copy#

Structure/Union member

ctx_size#

Structure/Union member

final#

Structure/Union member

flags#

Structure/Union member

classmethod from_name(digest_name)#
init#

Structure/Union member

md_ctrl#

Structure/Union member

md_size#

Structure/Union member

pkey_type#

Structure/Union member

required_pkey_type#

Structure/Union member

sign#

Structure/Union member

type#

Structure/Union member

update#

Structure/Union member

verify#

Structure/Union member

jaraco.crypto.evp.get_error()#
exception jaraco.crypto.rand.RandError#

Bases: Exception

jaraco.crypto.rand.bytes(num, check_result=False)#
jaraco.crypto.rand.pseudo_bytes(num)#
jaraco.crypto.rand.seed(data, entropy=None)#
jaraco.crypto.support.find_lib_Darwin(lib_name)#
jaraco.crypto.support.find_lib_Linux(lib_name)#
jaraco.crypto.support.find_lib_Windows(lib_name)#

Default OpenSSL installs to the Windows system folder and are reachable without a path or extension, but must have the right name.

jaraco.crypto.support.find_library(lib_name)#

Given a name like libcrypto, find the best match and load it.

Indices and tables#