28
Sarcină
Java Collections, nivel, lecţie
Password generator
Implement the getPassword() method, which must return a ByteArrayOutputStream with the bytes comprising the password.
Password requirements:
1) 8 characters.
2) Only numbers and uppercase and lowercase Latin letters.
3) At least one numeral, one lowercase letter, and one uppercase letter.
14
Sarcină
Java Collections, nivel, lecţie
Data integrity
Imagine this situation: you're downloading a zip file from the Internet and in the middle of the download you lose your connection for a few seconds.
You need to be sure that the downloaded zip file is valid. To do this, check its MD5 hash.
Read about MD5 on Wikipedia.
Read about MessageDigest.