question: private boolean verifyPassword ( String encryptedPassword , String password ) { if ( encryptedPassword == null ) return false ; Crypt c = new Crypt ( ) ; try { byte oldCrypt [ ] = encryptedPassword . getBytes ( "UTF8" ) ; byte newCrypt [ ] = c . crypt ( password . getBytes ( "UTF8" ) , oldCrypt ) ; if ( newCrypt . length != oldCrypt . length ) return false ; for ( int i = 0 ; i < newCrypt . length ; i ++ ) { if ( oldCrypt [ i ] != newCrypt [ i ] ) return false ; } } catch ( java . io . UnsupportedEncodingException uee ) { return false ; } return true ; }
target:  Verify a password against the encrypted passwd from /etc/shadow