Piotr Lizończyk 46825bb075 Added NoiseBuilder class as final interface. (#1)
noise/__init__.py
- __all__ containing builder module

noise/builder.py
- NoiseBuilder class providing interface for use with other apps. Allows
for setting up all required data for Noise protocol, using appropriate
methods. Enforces proper path of handshake execution

noise/constants.py
- Added maximum Noise message length constant

noise/exceptions.py
- A few exceptions created for proper signaling of errors

noise/noise_protocol.py
- handshake_done does proper cleanup now
- new validation method that should be ran before starting handshake
(checks presence of prerequisites for current settings)
- new HandshakeState initialization method

noise/state.py
- Modified read_message and write_message methods of HandshakeState to
operate on bytes/bytearray as message/payload and bytearray as
message_buffer/payload_buffer. It is application's responsibility to
provide data in this form, underlying Noise code doesn't do buffer
reading/writing anymore.

tests/test_vectors.py
- Changed tests to comply with new code
2017-09-02 16:09:49 +02:00
2017-08-06 21:29:10 +02:00
2016-02-18 18:30:47 +01:00
2017-08-19 00:04:56 +02:00
Description
No description provided
Readme MIT 815 KiB
Languages
Python 100%