cn.gtmap.estateplat.utils
类 DESPlus

java.lang.Object
  继承者 cn.gtmap.estateplat.utils.DESPlus

public class DESPlus
extends Object

作者:
zhoutao 数据库密码加密

构造方法摘要
DESPlus()
          默认构造方法,使用默认密钥
DESPlus(String strKey)
          指定密钥构造方法
 
方法摘要
static String byteArr2HexStr(byte[] arrB)
          将byte数组转换为表示16进制值的字符串, 如:byte[]{8,18}转换为:0813, 和public static byte[] hexStr2ByteArr(String strIn) 互为可逆的转换过程
 byte[] decrypt(byte[] arrB)
          解密字节数组
 String decrypt(String strIn)
          解密字符串
 byte[] encrypt(byte[] arrB)
          加密字节数组
 String encrypt(String strIn)
          加密字符串
static byte[] hexStr2ByteArr(String strIn)
          将表示16进制值的字符串转换为byte数组, 和public static String byteArr2HexStr(byte[] arrB) 互为可逆的转换过程
static void main(String[] args)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

DESPlus

public DESPlus()
默认构造方法,使用默认密钥


DESPlus

public DESPlus(String strKey)
指定密钥构造方法

参数:
strKey - 指定的密钥
方法详细信息

byteArr2HexStr

public static String byteArr2HexStr(byte[] arrB)
将byte数组转换为表示16进制值的字符串, 如:byte[]{8,18}转换为:0813, 和public static byte[] hexStr2ByteArr(String strIn) 互为可逆的转换过程

参数:
arrB - 需要转换的byte数组
返回:
转换后的字符串

hexStr2ByteArr

public static byte[] hexStr2ByteArr(String strIn)
将表示16进制值的字符串转换为byte数组, 和public static String byteArr2HexStr(byte[] arrB) 互为可逆的转换过程

参数:
strIn - 需要转换的字符串
返回:
转换后的byte数组

encrypt

public byte[] encrypt(byte[] arrB)
加密字节数组

参数:
arrB - 需加密的字节数组
返回:
加密后的字节数组

encrypt

public String encrypt(String strIn)
加密字符串

参数:
strIn - 需加密的字符串
返回:
加密后的字符串

decrypt

public byte[] decrypt(byte[] arrB)
解密字节数组

参数:
arrB - 需解密的字节数组
返回:
解密后的字节数组

decrypt

public String decrypt(String strIn)
解密字符串

参数:
strIn - 需解密的字符串
返回:
解密后的字符串

main

public static void main(String[] args)


Copyright © 2015–2020 cn.gtmap. All rights reserved.