Commits

Peter Sagerson committed 576e3c5

Documentation and test fixes.

  • Participants
  • Parent commits a0ba10d

Comments (0)

Files changed (3)

File docs/source/index.rst

 =======
 
 .. include:: ../../LICENSE
-
-
-Indices and tables
-==================
-
-* :ref:`genindex`
-* :ref:`modindex`
-* :ref:`search`

File yubiotp/client.py

 
     _base_url = None
 
-    def _get_base_url(self):
+    @property
+    def base_url(self):
         if self._base_url is None:
             self._base_url = self.default_base_url()
 
         return self._base_url
 
-    def _set_base_url(self, url):
+    @base_url.setter
+    def base_url(self, url):
         self._base_url = url
 
-    def _del_base_url(self):
+    @base_url.deleter
+    def base_url(self):
         delattr(self, '_base_url')
 
-    base_url = property(_get_base_url, _set_base_url, _del_base_url)
-
     def default_base_url(self):
         if self.ssl:
             return 'https://api.yubico.com/wsapi/verify'
         """
         Performs all validity checks (signature, token, and nonce).
 
-        :param bool strict: If ``True``, all validity checks
+        :param bool strict: If ``True``, all validity checks must pass
+            unambiguously. Otherwise, this only requires that no validity check
+            fails.
         :returns: ``True`` if none of the validity checks fail.
         :rtype: bool
         """

File yubiotp/otp.py

 Implementation of the Yubico OTP algorithm. This can generate and parse OTP
 structures.
 
+>>> from binascii import unhexlify
 >>> key = '0123456789abcdef'
->>> otp = OTP(0xba9876543210, 5, 0x0153f8, 0, 0x1234)
+>>> otp = OTP(unhexlify('0123456789ab'), 5, 0x0153f8, 0, 0x1234)
 >>> token = encode_otp(otp, key, 'cclngiuv')
 >>> token
-'cclngiuvefnijnthcvncrgbrrklcfrhndchilifi'
+'cclngiuvttkhthcilurtkerbjnnkljfkjccklkhl'
 >>> public_id, otp2 = decode_otp(token, key)
 >>> public_id
 'cclngiuv'