ImageVerifierCode 换一换
格式:DOCX , 页数:99 ,大小:36.12KB ,
资源ID:18681268      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/18681268.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(代码1Word下载.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

代码1Word下载.docx

1、 protected final int lineLength; private final int chunkSeparatorLength; protected BaseNCodec(int unencodedBlockSize, int encodedBlockSize, int lineLength, int chunkSeparatorLength) this(unencodedBlockSize, encodedBlockSize, lineLength, chunkSeparatorLength, (byte)61); protected BaseNCodec(int unenc

2、odedBlockSize, int encodedBlockSize, int lineLength, int chunkSeparatorLength, byte pad) this.unencodedBlockSize = unencodedBlockSize; this.encodedBlockSize = encodedBlockSize; boolean useChunking = (lineLength 0) & (chunkSeparatorLength 0); this.lineLength = (useChunking ? lineLength / encodedBlock

3、Size * encodedBlockSize : this.chunkSeparatorLength = chunkSeparatorLength; this.pad = pad; boolean hasData(Context context) return context.buffer != null; int available(Context context)= null ? context.pos - context.readPos : 0; protected int getDefaultBufferSize() return 8192; private byte resizeB

4、uffer(Context context) if (context.buffer = null) context.buffer = new bytegetDefaultBufferSize(); context.pos = 0; context.readPos = 0; else byte b = new bytecontext.buffer.length * 2; System.arraycopy(context.buffer, 0, b, 0, context.buffer.length); context.buffer = b; return context.buffer; prote

5、cted byte ensureBufferSize(int size, Context context) if (context.buffer = null) | (context.buffer.length = context.pos) context.buffer = null; return len; return context.eof ? -1 : return false; public Object encode(Object obj) throws EncoderException if (!(obj instanceof byte) throw new EncoderExc

6、eption(Parameter supplied to Base-N encode is not a byte); return encode(byte)obj); public String encodeToString(byte pArray) return StringUtils.newStringUtf8(encode(pArray); public String encodeAsString(byte pArray) public Object decode(Object obj) throws DecoderException if (obj instanceof byte) r

7、eturn decode(byte)obj); if (obj instanceof String) return decode(String)obj); throw new DecoderException(Parameter supplied to Base-N decode is not a byte or a String public byte decode(String pArray) return decode(StringUtils.getBytesUtf8(pArray); public byte decode(byte pArray) if (pArray = null)

8、| (pArray.length = 0) return pArray; Context context = new Context(); decode(pArray, 0, pArray.length, context); decode(pArray, 0, -1, context); byte result = new bytecontext.pos; readResults(result, 0, result.length, context); return result; public byte encode(byte pArray) encode(pArray, 0, pArray.

9、length, context); encode(pArray, 0, -1, context); byte buf = new bytecontext.pos - context.readPos; readResults(buf, 0, buf.length, context); return buf; abstract void encode(byte paramArrayOfByte, int paramInt1, int paramInt2, Context paramContext); abstract void decode(byte paramArrayOfByte, int p

10、aramInt1, int paramInt2, Context paramContext); protected abstract boolean isInAlphabet(byte paramByte); public boolean isInAlphabet(byte arrayOctet, boolean allowWSPad) for (int i = 0; i 0) len += (len + this.lineLength - 1L) / this.lineLength * this.chunkSeparatorLength; static class Context int i

11、bitWorkArea; long lbitWorkArea; byte buffer; int pos; int readPos; boolean eof; int currentLinePos; int modulus; public String toString() return String.format(%sbuffer=%s, currentLinePos=%s, eof=%s, ibitWorkArea=%s, lbitWorkArea=%s, modulus=%s, pos=%s, readPos=%s, new Object getClass().getSimpleName

12、(), Arrays.toString(this.buffer), Integer.valueOf(this.currentLinePos), Boolean.valueOf(this.eof), Integer.valueOf(this.ibitWorkArea), Long.valueOf(this.lbitWorkArea), Integer.valueOf(this.modulus), Integer.valueOf(this.pos), Integer.valueOf(this.readPos) );package mons.codec.digest;import java.io.I

13、OException;import java.io.InputStream;import java.security.MessageDigest;import java.security.NoSuchAlgorithmException;import mons.codec.binary.Hex;import mons.codec.binary.StringUtils;public class DigestUtils private static final int STREAM_BUFFER_LENGTH = 1024; private static byte digest(MessageDi

14、gest digest, InputStream data) throws IOException return updateDigest(digest, data).digest(); public static MessageDigest getDigest(String algorithm) try return MessageDigest.getInstance(algorithm); catch (NoSuchAlgorithmException e) throw new IllegalArgumentException(e); public static MessageDigest

15、 getMd2Digest() return getDigest(MD2 public static MessageDigest getMd5Digest()MD5 public static MessageDigest getSha1Digest()SHA-1 public static MessageDigest getSha256Digest()SHA-256 public static MessageDigest getSha384Digest()SHA-384 public static MessageDigest getSha512Digest()SHA-512 public st

16、atic MessageDigest getShaDigest() return getSha1Digest(); public static byte md2(byte data) return getMd2Digest().digest(data); public static byte md2(InputStream data) return digest(getMd2Digest(), data); public static byte md2(String data) return md2(StringUtils.getBytesUtf8(data); public static S

17、tring md2Hex(byte data) return Hex.encodeHexString(md2(data); public static String md2Hex(InputStream data) public static String md2Hex(String data) public static byte md5(byte data) return getMd5Digest().digest(data); public static byte md5(InputStream data) return digest(getMd5Digest(), data); pub

18、lic static byte md5(String data) return md5(StringUtils.getBytesUtf8(data); public static String md5Hex(byte data) return Hex.encodeHexString(md5(data); public static String md5Hex(InputStream data) public static String md5Hex(String data) public static byte sha(byte data) return sha1(data); public

19、static byte sha(InputStream data) public static byte sha(String data) public static byte sha1(byte data) return getSha1Digest().digest(data); public static byte sha1(InputStream data) return digest(getSha1Digest(), data); public static byte sha1(String data) return sha1(StringUtils.getBytesUtf8(data

20、); public static String sha1Hex(byte data) return Hex.encodeHexString(sha1(data); public static String sha1Hex(InputStream data) public static String sha1Hex(String data) public static byte sha256(byte data) return getSha256Digest().digest(data); public static byte sha256(InputStream data) return digest(getSha256Digest(), data); public static byte sha256(String data) return sha256(StringUtils.getBytesUtf8(data); public static String sha256Hex(byte data) return Hex.encodeHexString(sha256(data); public static String sha256Hex(InputStream data)

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1