146147148149150151152153154155156
byte[] encoded; if(password.length > 0){ encoded = hasher.calculateHash(password); }else{ encoded = password; }
8081828384858687888990
}else if ( encoding == org.gudy.azureus2.plugins.ui.config.PasswordParameter.ET_SHA1 ){ SHA1Hasher hasher = new SHA1Hasher(); encoded = hasher.calculateHash(password); }else{ // newly added, might as well go for UTF-8
127128129130131132133134135136137
{ if ( encoding_type == ET_SHA1 ){ SHA1Hasher hasher = new SHA1Hasher(); return( hasher.calculateHash( bytes )); }else if ( encoding_type == ET_MD5 ){ try{ return( MessageDigest.getInstance( "md5" ).digest( bytes ));
7677787980818283848586
data_in = new byte[0]; } SHA1Hasher hasher = new SHA1Hasher(); return( hasher.calculateHash(data_in)); } public void runWithAuthenticator( Authenticator authenticator,