Use PasswordMetrics to remove duplicated code.

Bug: 30558331
Test: manual
Change-Id: I832a0279d39dbe9900b284abd745d4cc40946a48
1 file changed