diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2013-11-16 08:16:24 -0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2013-11-16 08:16:24 -0800 |
commit | 0c679c64241d74dd02bda891c9f04508cd535535 (patch) | |
tree | 9543c85f4af27d40fea49d3de4adfea30c276045 | |
parent | 1bbb7ce8b5e5c6379227dcb79c51bddbda6e4d23 (diff) | |
download | cryptography-0c679c64241d74dd02bda891c9f04508cd535535.tar.gz cryptography-0c679c64241d74dd02bda891c9f04508cd535535.tar.bz2 cryptography-0c679c64241d74dd02bda891c9f04508cd535535.zip |
const correctness
-rw-r--r-- | cryptography/hazmat/primitives/padding.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cryptography/hazmat/primitives/padding.py b/cryptography/hazmat/primitives/padding.py index b07f5014..926a4bbd 100644 --- a/cryptography/hazmat/primitives/padding.py +++ b/cryptography/hazmat/primitives/padding.py @@ -20,7 +20,7 @@ from cryptography.hazmat.primitives import interfaces _ffi = cffi.FFI() _ffi.cdef(""" -bool Cryptography_check_padding(uint8_t *, unsigned int); +bool Cryptography_check_padding(const uint8_t *, unsigned int); """) _lib = _ffi.verify(""" #include <stdbool.h> @@ -40,7 +40,7 @@ unsigned int Cryptography_constant_time_lt(unsigned int a, unsigned int b) { return Cryptography_DUPLICATE_MSB_TO_ALL(a); } -bool Cryptography_check_padding(uint8_t *data, unsigned int block_len) { +bool Cryptography_check_padding(const uint8_t *data, unsigned int block_len) { unsigned int i; uint8_t pad_size = data[block_len - 1]; uint8_t mismatch = 0; |