public static final String decodePassword ( byte [ ] data , byte encryptionCode ) { String result ; if ( data . length < MINIMUM_PASSWORD_DATA_LENGTH ) { result = null ; } else { MPPUtility . decodeBuffer ( data , encryptionCode ) ; StringBuilder buffer = new StringBuilder ( ) ; char c ; for ( int i = 0 ; i < PASSWORD_MASK . length ; i ++ ) { int index = PASSWORD_MASK [ i ] ; c = ( char ) data [ index ] ; if ( c == 0 ) { break ; } buffer . append ( c ) ; } result = buffer . toString ( ) ; } return ( result ) ; }
Decode the password from the given data . Will decode the data block as well .