Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
matrix-org
Olm
Commits
357d4ff4
Commit
357d4ff4
authored
Oct 16, 2018
by
Hubert Chathi
Browse files
remove unnecessary comments about not enough random
parent
019ff702
Changes
3
Hide whitespace changes
Inline
Side-by-side
python/olm/account.py
View file @
357d4ff4
...
@@ -206,9 +206,7 @@ class Account(object):
...
@@ -206,9 +206,7 @@ class Account(object):
If the total number of keys stored by this account exceeds
If the total number of keys stored by this account exceeds
max_one_time_keys() then the old keys are discarded.
max_one_time_keys() then the old keys are discarded.
Raises OlmAccountError on error. If the number of random bytes is
Raises OlmAccountError on error.
too small then the error message of the exception will be
NOT_ENOUGH_RANDOM.
Args:
Args:
count(int): The number of keys to generate.
count(int): The number of keys to generate.
...
...
python/olm/group_session.py
View file @
357d4ff4
...
@@ -314,8 +314,7 @@ class OutboundGroupSession(object):
...
@@ -314,8 +314,7 @@ class OutboundGroupSession(object):
"""Create a new outbound group session.
"""Create a new outbound group session.
Start a new outbound group session. Raises OlmGroupSessionError on
Start a new outbound group session. Raises OlmGroupSessionError on
failure. If there weren't enough random bytes for the session creation
failure.
the error message for the exception will be NOT_ENOUGH_RANDOM.
"""
"""
if
False
:
# pragma: no cover
if
False
:
# pragma: no cover
self
.
_session
=
self
.
_session
# type: ffi.cdata
self
.
_session
=
self
.
_session
# type: ffi.cdata
...
...
python/olm/session.py
View file @
357d4ff4
...
@@ -212,9 +212,7 @@ class Session(object):
...
@@ -212,9 +212,7 @@ class Session(object):
def
encrypt
(
self
,
plaintext
):
def
encrypt
(
self
,
plaintext
):
# type: (AnyStr) -> _OlmMessage
# type: (AnyStr) -> _OlmMessage
"""Encrypts a message using the session. Returns the ciphertext as a
"""Encrypts a message using the session. Returns the ciphertext as a
base64 encoded string on success. Raises OlmSessionError on failure. If
base64 encoded string on success. Raises OlmSessionError on failure.
there weren't enough random bytes to encrypt the message the error
message for the exception will be NOT_ENOUGH_RANDOM.
Args:
Args:
plaintext(str): The plaintext message that will be encrypted.
plaintext(str): The plaintext message that will be encrypted.
...
@@ -424,9 +422,7 @@ class OutboundSession(Session):
...
@@ -424,9 +422,7 @@ class OutboundSession(Session):
identity key and one-time key.
identity key and one-time key.
Raises OlmSessionError on failure. If the keys couldn't be decoded as
Raises OlmSessionError on failure. If the keys couldn't be decoded as
base64 then the error message will be "INVALID_BASE64". If there
base64 then the error message will be "INVALID_BASE64".
weren't enough random bytes for the session creation the error message
for the exception will be NOT_ENOUGH_RANDOM.
Args:
Args:
account(Account): The Olm Account that will be used to create this
account(Account): The Olm Account that will be used to create this
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment