Skip to main content

Module negative

Module negative 

Source
Expand description

Generic negative-fixture helpers (corrupt PEM, truncate DER, etc.).

Enums§

CorruptPem
Strategies for corrupting PEM-encoded data.

Functions§

corrupt_der_deterministic
Choose a corruption strategy deterministically from variant and apply it to der.
corrupt_pem
Apply a specific CorruptPem corruption strategy to the given PEM string.
corrupt_pem_deterministic
Choose a corruption strategy deterministically from variant and apply it to pem.
flip_byte
XOR the byte at offset with 0x01, returning the original if offset is out of range.
truncate_der
Truncate der to at most len bytes, returning the original if already shorter.