cocagne / pysrp

Python implementation of the Secure Remote Password protocol (SRP)
MIT License
113 stars 42 forks source link

AttributeError when using create_salted_verification_key #25

Closed ipfans closed 6 years ago

ipfans commented 7 years ago

I used latest version srp:

$ pip install git+https://github.com/cocagne/pysrp.git@1.0.8
Collecting git+https://github.com/cocagne/pysrp.git@1.0.8
  Cloning https://github.com/cocagne/pysrp.git (to 1.0.8) to /private/var/folders/g9/m3cmg0m10cl80xt362wpsld00000gn/T/pip-sb9zr717-build
Requirement already satisfied: six in /xxxx/xxx/xxx/xxx/env/lib/python3.6/site-packages (from srp==1.0.8)
Installing collected packages: srp
  Found existing installation: srp 1.0.7
    Uninstalling srp-1.0.7:
      Successfully uninstalled srp-1.0.7
  Running setup.py install for srp ... done
Successfully installed srp-1.0.8

Example:

import srp

def main():
    print(srp)
    salt, vkey = srp.create_salted_verification_key('testuser', 'testpassword')
    print(salt, vkey)

if __name__ == '__main__':
    main()

Then I got error:

$ python srp.py
<module 'srp' from '/xxxx/xxx/xxx/xxx/srp.py'>
Traceback (most recent call last):
  File "srp.py", line 11, in <module>
    main()
  File "srp.py", line 6, in main
    salt, vkey = srp.create_salted_verification_key('testuser', 'testpassword')
AttributeError: module 'srp' has no attribute 'create_salted_verification_key'

I tested under Python 3.6.2(OSX) with virtualenv enabled. #

ipfans commented 7 years ago

and pysrp@1.0.8 still not upload to pypi

samlll42-github commented 6 years ago

I would recommend not calling your test file srp.py