⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sepublickeyimpl.java

📁 java 文件下载器。可自定义
💻 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:   SEPublicKeyImpl.java

package org.gudy.azureus2.pluginsimpl.local.utils.security;

import java.util.Arrays;
import org.gudy.azureus2.core3.util.HashWrapper;
import org.gudy.azureus2.plugins.utils.security.SEPublicKey;

public class SEPublicKeyImpl
	implements SEPublicKey
{

	private int type;
	private byte encoded[];
	private int hashcode;

	public static SEPublicKey decode(byte encoded[])
	{
		int type = encoded[0] & 0xff;
		byte x[] = new byte[encoded.length - 1];
		System.arraycopy(encoded, 1, x, 0, x.length);
		return new SEPublicKeyImpl(type, x);
	}

	protected SEPublicKeyImpl(int _type, byte _encoded[])
	{
		type = _type;
		encoded = _encoded;
		hashcode = (new HashWrapper(encoded)).hashCode();
	}

	public int getType()
	{
		return type;
	}

	public byte[] encodePublicKey()
	{
		byte res[] = new byte[encoded.length + 1];
		res[0] = (byte)type;
		System.arraycopy(encoded, 0, res, 1, encoded.length);
		return res;
	}

	public byte[] encodeRawPublicKey()
	{
		byte res[] = new byte[encoded.length];
		System.arraycopy(encoded, 0, res, 0, encoded.length);
		return res;
	}

	public boolean equals(Object other)
	{
		if (other instanceof SEPublicKeyImpl)
			return Arrays.equals(encoded, ((SEPublicKeyImpl)other).encoded);
		else
			return false;
	}

	public int hashCode()
	{
		return hashcode;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -