Took a basic pwd similarity non-working version from Abhinav. Refactored it, added a lot of new code, made it work. Also for comparison and testing, added plaintext pwd similarity function. Both values seem to match