Use String for all three.
String allows you to use the full range of characters, including lowercase, uppercase, numbers, and special characters. Each of the examples you provided (email address, phone number and password) will use elements from the full character set. (email '@', phone '-' and '()', and passwords are more effective the larger the character set selected from.)
Strings can also be parsed using regular expressions to test them and match the database. For example, you can select a consistent format for the telephone numbers “++ 64 4 12345678” and use RE to achieve this state before storing it in the database. Equally, you can use REs to remove all extra characters and save the phone number as an int.
Passwords using only int, have a character base of 10 characters, the full character set has (26 + 26 + 10 + 33) = 95 characters. If your password is 8 characters long, then there are 10 ^ 8 or 100,000,000 combinations (trivial for brute force) or 95 ^ 8, which is much more than brute force more difficult.
Matt stevens
source share