summaryrefslogtreecommitdiff
path: root/otp2289/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'otp2289/__init__.py')
-rw-r--r--otp2289/__init__.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/otp2289/__init__.py b/otp2289/__init__.py
new file mode 100644
index 0000000..d2f6386
--- /dev/null
+++ b/otp2289/__init__.py
@@ -0,0 +1,28 @@
1# -*- coding: utf-8 -*-
2"""A pure Python implementation of RFC-2289"""
3
4from .generator import (OTP_ALGO_MD5,
5 OTP_ALGO_SHA1,
6 OTPGenerator,
7 OTPGeneratorException)
8
9
10__author__ = 'Simeon Simeonov'
11__version__ = '1.0.0'
12__license__ = 'GPL3'
13
14
15def int_or_str(value):
16 """Returns int value of value when possible"""
17 try:
18 return int(value)
19 except ValueError:
20 return value
21
22
23VERSION = tuple(map(int_or_str, __version__.split('.')))
24
25__all__ = ['OTP_ALGO_MD5',
26 'OTP_ALGO_SHA1',
27 'OTPGenerator',
28 'OTPGeneratorException']