The post you mention, mentions to store the values of the old passwords in a hashstring attribute.
By using the method verifyValue for the hashstring attribute you can see if the password string was already used, but can’t get the original password string. This should still work and you should make sure that the data can’t be accessed by any user role.