mirror of
https://github.com/Legrandin/pycryptodome.git
synced 2025-12-08 05:19:46 +00:00
Support for memoryview in CBC/OFB/CFB mode
This commit is contained in:
parent
0914cc686d
commit
1a56f87afe
6 changed files with 167 additions and 25 deletions
|
|
@ -26,7 +26,7 @@ Counter Feedback (CFB) mode.
|
|||
|
||||
__all__ = ['CfbMode']
|
||||
|
||||
from Crypto.Util.py3compat import bstr
|
||||
from Crypto.Util.py3compat import _copy_bytes
|
||||
from Crypto.Util._raw_api import (load_pycryptodome_raw_lib, VoidPointer,
|
||||
create_string_buffer, get_raw_buffer,
|
||||
SmartPointer, c_size_t, c_uint8_ptr)
|
||||
|
|
@ -111,7 +111,7 @@ class CfbMode(object):
|
|||
self.block_size = len(iv)
|
||||
"""The block size of the underlying cipher, in bytes."""
|
||||
|
||||
self.iv = bstr(iv)
|
||||
self.iv = _copy_bytes(0, iv)
|
||||
"""The Initialization Vector originally used to create the object.
|
||||
The value does not change."""
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue