I work with odoo and I want to install the module of paybox : this one : https://bitbucket.org/anybox/anybox_paybox/ For that : this module needs pycrypto to work
So, I installed pycrypto in the linux server (ubuntu)
git clone https://github.com/dlitz/pycrypto.git
./configure
python setup.py build
python setup.py install
and I made this test : python setup.py test Result there is no error but the problem comes here : in this file //paybox_signature.py//
# coding: utf-8
import urllib
import base64
from Crypto.PublicKey import RSA
from Crypto.Signature import PKCS1_v1_5
from Crypto.Hash import SHA
class Signature():
def verify(self, signature, msg, key):
""" check if the signature is correct according to the public key path given
and the message """
msg = self.remove_sign(msg)
key = RSA.importKey(key)
ha = SHA.SHA1Hash().new(msg)
verifier = PKCS1_v1_5.new(key)
signature = urllib.unquote(signature)
signature = base64.b64decode(signature)
return verifier.verify(ha, signature)
def remove_sign(self, msg):
""" remove signature arg from the given string"""
pos = msg.find('&Signature')
if pos == -1:
return msg
return msg[:pos]
when I execute this line of the file :
from Crypto.PublicKey import RSA
--> It ok there is no error
when I do this
from Crypto.Signature import PKCS1_v1_5
--> Traceback (most recent call last): File "", line 1, in ImportError: No module named Signature
I don't know Why All the modules are there why python make this error !! really I don't know Please I need your help Thank you