aboutsummaryrefslogtreecommitdiffstats
path: root/cryptography/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'cryptography/utils.py')
-rw-r--r--cryptography/utils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cryptography/utils.py b/cryptography/utils.py
index 55187c3b..1deb3d1d 100644
--- a/cryptography/utils.py
+++ b/cryptography/utils.py
@@ -26,6 +26,10 @@ def register_interface(iface):
return register_decorator
+def read_only_property(name):
+ return property(lambda self: getattr(self, name))
+
+
def bit_length(x):
if sys.version_info >= (2, 7):
return x.bit_length()