md5 hash password

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Phaedos
    Junior Member
    • Feb 2014
    • 13

    #1

    md5 hash password

    Hi,

    Is there anyway to encrypt your login for the Betfair API?

    Something like (in Python):

    Code:
    import hashlib
    
    def bfpass(password, appKey=''):
        key = password + appKey
        return hashlib.md5(key).hexdigest()
    
    payload = 'username=MyUserName&password='+bfpass('myBFPassword')
    seems to trigger invalid password (with or without the appKey), but I'd rather not leave my BF password in plain text in the script if it can be helped....
  • AlgoTrader
    Junior Member
    • Mar 2012
    • 243

    #2
    Betfair uses HTTPS protocol that uses good encryption. All the data between the client and Betfair are encrypted. The password transmitted to Betfair is encrypted because all is encrypted.

    Hashing password and transmittion of the hash DOES NOT IMPROVE security. You cannot reverse the hash, but there is no need. One can steal your MD5 hash and use it.

    Personally, I put password in environment variable on my system, so that not to commit it to github:

    Code:
       this.applicationKey = process.env["BF_APPLICATION_KEY"] || "key";
       this.loginName = process.env["BF_LOGIN"] || "nobody";
       this.password = process.env["BF_PASSWORD"] || "password";
    My password is never used in script, but it has to be set somehow in enviroment variables
    Betfair Bots Made Easy

    Comment

    • Phaedos
      Junior Member
      • Feb 2014
      • 13

      #3
      I had thought because of other APIs I had used that hashing the key would be a good idea, but I see now that you are indeed right...thanks for the help.

      Comment

      Working...
      X