📄 passwordparameterimpl.java
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space
// Source File Name: PasswordParameterImpl.java
package org.gudy.azureus2.pluginsimpl.local.ui.config;
import java.security.MessageDigest;
import org.gudy.azureus2.core3.config.COConfigurationManager;
import org.gudy.azureus2.core3.util.Debug;
import org.gudy.azureus2.core3.util.SHA1Hasher;
import org.gudy.azureus2.plugins.ui.config.PasswordParameter;
import org.gudy.azureus2.pluginsimpl.local.PluginConfigImpl;
// Referenced classes of package org.gudy.azureus2.pluginsimpl.local.ui.config:
// ParameterImpl
public class PasswordParameterImpl extends ParameterImpl
implements PasswordParameter
{
protected byte defaultValue[];
protected int encoding_type;
public PasswordParameterImpl(PluginConfigImpl config, String key, String label, int _encoding_type, byte _defaultValue[])
{
super(config, key, label);
if (_defaultValue == null)
{
defaultValue = new byte[0];
} else
{
defaultValue = _defaultValue;
if (_encoding_type == 2)
{
SHA1Hasher hasher = new SHA1Hasher();
defaultValue = hasher.calculateHash(defaultValue);
} else
if (_encoding_type == 3)
try
{
defaultValue = MessageDigest.getInstance("md5").digest(defaultValue);
}
catch (Throwable e)
{
Debug.printStackTrace(e);
}
}
config.notifyParamExists(getKey());
COConfigurationManager.setByteDefault(getKey(), defaultValue);
encoding_type = _encoding_type;
}
public byte[] getDefaultValue()
{
return defaultValue;
}
public int getEncodingType()
{
return encoding_type;
}
public byte[] getValue()
{
return config.getUnsafeByteParameter(getKey(), getDefaultValue());
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -