Checks if a credit card number is valid based off of the techniques from this infographic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from hashlib import sha1 | |
from base64 import b64encode | |
password = raw_input("Enter password: ") | |
encoded = b64encode(sha1(password).digest()) | |
print "Encoded password is:" | |
print encoded |