aboutsummaryrefslogtreecommitdiff
path: root/python/olm/outbound_group_session.py
diff options
context:
space:
mode:
authorJ08nY <johny@neuromancer.sk>2017-04-02 00:35:55 +0200
committerRichard van der Hoff <richard@matrix.org>2017-04-04 10:45:11 +0100
commit001dc1edaa4c5306fbb7c625202788458dadeafa (patch)
treeef9201b107d717c34b19f3fb9d4dca56d0fa32fe /python/olm/outbound_group_session.py
parentbb05b5687f12782cc2e87ffdf2dc0dfe0f6dcfb6 (diff)
Python: Switch to a more general os.urandom for randomness source
Signed-off-by: Jan Jancar <johny@neuromancer.sk>
Diffstat (limited to 'python/olm/outbound_group_session.py')
-rw-r--r--python/olm/outbound_group_session.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/python/olm/outbound_group_session.py b/python/olm/outbound_group_session.py
index 56f0962..e888f41 100644
--- a/python/olm/outbound_group_session.py
+++ b/python/olm/outbound_group_session.py
@@ -1,4 +1,5 @@
import json
+from os import urandom
from ._base import *
@@ -56,7 +57,7 @@ class OutboundGroupSession(object):
self.ptr = lib.olm_outbound_group_session(self.buf)
random_length = lib.olm_init_outbound_group_session_random_length(self.ptr)
- random = read_random(random_length)
+ random = urandom(random_length)
random_buffer = create_string_buffer(random)
lib.olm_init_outbound_group_session(self.ptr, random_buffer, random_length)