導航:首頁 > 源碼編譯 > des演算法java代碼

des演算法java代碼

發布時間:2023-01-30 07:50:19

1. DES加密演算法 java實現

c語言的源代碼,供參考:

http://hi..com/gaojinshan/blog/item/8b2710c4ece4b3ce39db49e9.html

2. Java中 DES加密演算法

package des;
import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKey;
import java.security.NoSuchAlgorithmException;
import sun.misc.*;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import javax.crypto.BadPaddingException;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.spec.SecretKeySpec;
import java.security.*;
import javax.crypto.SecretKeyFactory;
import java.security.spec.*;
import javax.crypto.spec.DESedeKeySpec;
/**
解密
*/
class DES {
private static String Algorithm = "DESede";//加密演算法的名稱
private static Cipher c;//密碼器
private static byte[] cipherByte;
private static SecretKey deskey;//密鑰
private static String keyString = "";//獲得密鑰的參數
//對base64編碼的string解碼成byte數組
public byte[] deBase64(String parm) throws IOException {
BASE64Decoder dec=new BASE64Decoder();
byte[] dnParm = dec.decodeBuffer(parm);
System.out.println(dnParm.length);
System.out.println(dnParm);
return dnParm;
}
//把密鑰參數轉為byte數組
public byte[] dBase64(String parm) throws IOException {
BASE64Decoder dec=new BASE64Decoder();
byte[] dnParm = dec.decodeBuffer(parm);
return dnParm;
}
/**
* 對 Byte 數組進行解密
* @param buff 要解密的數據
* @return 返回加密後的 String
*/
public static String createDecryptor(byte[] buff) throws
NoSuchPaddingException, NoSuchAlgorithmException,
UnsupportedEncodingException {
try {
c.init(Cipher.DECRYPT_MODE, deskey);//初始化密碼器,用密鑰deskey,進入解密模式
cipherByte = c.doFinal(buff);
}
catch(java.security.InvalidKeyException ex){
ex.printStackTrace();
}
catch(javax.crypto.BadPaddingException ex){
ex.printStackTrace();
}
catch(javax.crypto.IllegalBlockSizeException ex){
ex.printStackTrace();
}
return (new String(cipherByte,"UTF-8"));
}
public void getKey(String key) throws IOException, InvalidKeyException,
InvalidKeySpecException {
byte[] dKey = dBase64(key);
try {
deskey=new javax.crypto.spec.SecretKeySpec(dKey,Algorithm);
c = Cipher.getInstance(Algorithm);
}
catch (NoSuchPaddingException ex) {
}
catch (NoSuchAlgorithmException ex) {
}
}

public static void main(String args[]) throws IOException,
NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeySpecException,
InvalidKeyException, IOException {
DES des = new DES();
des.getKey(keyString);//獲取密鑰
byte[] dBy = des.deBase64("t0/fDOZ5NaQ=");//獲取需要解密的字元串
String dStr = des.createDecryptor(dBy);
System.out.println("解密:"+dStr);
}
}

3. 用java實現des加密和解密

一個用DES來加密、解密的類
http://www.javanb.com/java/1/17816.html

import java.security.*;
import javax.crypto.Cipher;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.DESKeySpec;

/**
* 字元串工具集合
* @author Liudong
*/
public class StringUtils {

private static final String PASSWORD_CRYPT_KEY = "__jDlog_";
private final static String DES = "DES";

/**
* 加密
* @param src 數據源
* @param key 密鑰,長度必須是8的倍數
* @return 返回加密後的數據
* @throws Exception
*/
public static byte[] encrypt(byte[] src, byte[] key)throws Exception {
//DES演算法要求有一個可信任的隨機數源
SecureRandom sr = new SecureRandom();
// 從原始密匙數據創建DESKeySpec對象
DESKeySpec dks = new DESKeySpec(key);
// 創建一個密匙工廠,然後用它把DESKeySpec轉換成
// 一個SecretKey對象
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(DES);
SecretKey securekey = keyFactory.generateSecret(dks);
// Cipher對象實際完成加密操作
Cipher cipher = Cipher.getInstance(DES);
// 用密匙初始化Cipher對象
cipher.init(Cipher.ENCRYPT_MODE, securekey, sr);
// 現在,獲取數據並加密
// 正式執行加密操作
return cipher.doFinal(src);
}

/**
* 解密
* @param src 數據源
* @param key 密鑰,長度必須是8的倍數
* @return 返回解密後的原始數據
* @throws Exception
*/
public static byte[] decrypt(byte[] src, byte[] key)throws Exception {
// DES演算法要求有一個可信任的隨機數源
SecureRandom sr = new SecureRandom();
// 從原始密匙數據創建一個DESKeySpec對象
DESKeySpec dks = new DESKeySpec(key);
// 創建一個密匙工廠,然後用它把DESKeySpec對象轉換成
// 一個SecretKey對象
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(DES);
SecretKey securekey = keyFactory.generateSecret(dks);
// Cipher對象實際完成解密操作
Cipher cipher = Cipher.getInstance(DES);
// 用密匙初始化Cipher對象
cipher.init(Cipher.DECRYPT_MODE, securekey, sr);
// 現在,獲取數據並解密
// 正式執行解密操作
return cipher.doFinal(src);
}
/**
* 密碼解密
* @param data
* @return
* @throws Exception
*/
public final static String decrypt(String data){
try {
return new String(decrypt(hex2byte(data.getBytes()),
PASSWORD_CRYPT_KEY.getBytes()));
}catch(Exception e) {
}
return null;
}
/**
* 密碼加密
* @param password
* @return
* @throws Exception
*/
public final static String encrypt(String password){
try {
return byte2hex(encrypt(password.getBytes(),PASSWORD_CRYPT_KEY.getBytes())); }catch(Exception e) {
}
return null;
}

比較長, 轉了一部分.

4. 求高手給出以下JAVA代碼的DES加密解密方法的對應的C#的DES加密解密方法

Java密碼學結構設計遵循兩個原則:
1) 演算法的獨立性和可靠性。
2) 實現的獨立性和相互作用性。
演算法的獨立性是通過定義密碼服務類來獲得。用戶只需了解密碼演算法的概念,而不用去關心如何實現這些概念。實現的獨立性和相互作用性通過密碼服務提供器來實現。密碼服務提供器是實現一個或多個密碼服務的一個或多個程序包。軟體開發商根據一定介面,將各種演算法實現後,打包成一個提供器,用戶可以安裝不同的提供器。安裝和配置提供器,可將包含提供器的ZIP和JAR文件放在CLASSPATH下,再編輯Java安全屬性文件來設置定義一個提供器。

DES演算法及如何利用DES演算法加密和解密類文件的步驟:
DES演算法簡介
DES(Data Encryption Standard)是發明最早的最廣泛使用的分組對稱加密演算法。DES演算法的入口參數有三個:Key、Data、Mode。其中Key為8個位元組共64位,是DES演算法的工作密鑰;Data也為8個位元組64位,是要被加密或被解密的數據;Mode為DES的工作方式,有兩種:加密或解密。

5. 求用JAVA實現的DES演算法

package des;

import java.io.*;
import java.nio.*;
import java.nio.channels.FileChannel;

public class FileDES{
private static final boolean enc=true; //加密
private static final boolean dec=false; //解密

private String srcFileName;
private String destFileName;
private String inKey;
private boolean actionType;
private File srcFile;
private File destFile;
private Des des;

private void analyzePath(){
String dirName;
int pos=srcFileName.lastIndexOf("/");
dirName=srcFileName.substring(0,pos);
File dir=new File(dirName);
if (!dir.exists()){
System.err.println(dirName+" is not exist");
System.exit(1);
}else if(!dir.isDirectory()){
System.err.println(dirName+" is not a directory");
System.exit(1);
}

pos=destFileName.lastIndexOf("/");
dirName=destFileName.substring(0,pos);
dir=new File(dirName);
if (!dir.exists()){
if(!dir.mkdirs()){
System.out.println ("can not creat directory:"+dirName);
System.exit(1);
}
}else if(!dir.isDirectory()){
System.err.println(dirName+" is not a directory");
System.exit(1);
}
}

private static int replenish(FileChannel channel,ByteBuffer buf) throws IOException{
long byteLeft=channel.size()-channel.position();
if(byteLeft==0L)
return -1;
buf.position(0);
buf.limit(buf.position()+(byteLeft<8 ? (int)byteLeft :8));
return channel.read(buf);
}

private void file_operate(boolean flag){
des=new Des(inKey);
FileOutputStream outputFile=null;
try {
outputFile=new FileOutputStream(srcFile,true);
}catch (java.io.FileNotFoundException e) {
e.printStackTrace(System.err);
}
FileChannel outChannel=outputFile.getChannel();

try{
if(outChannel.size()%2!=0){
ByteBuffer bufTemp=ByteBuffer.allocate(1);
bufTemp.put((byte)32);
bufTemp.flip();
outChannel.position(outChannel.size());
outChannel.write(bufTemp);
bufTemp.clear();
}
}catch(Exception ex){
ex.printStackTrace(System.err);
System.exit(1);
}
FileInputStream inFile=null;
try{
inFile=new FileInputStream(srcFile);
}catch(java.io.FileNotFoundException e){
e.printStackTrace(System.err);
//System.exit(1);
}
outputFile=null;
try {
outputFile=new FileOutputStream(destFile,true);
}catch (java.io.FileNotFoundException e) {
e.printStackTrace(System.err);
}

FileChannel inChannel=inFile.getChannel();
outChannel=outputFile.getChannel();

ByteBuffer inBuf=ByteBuffer.allocate(8);
ByteBuffer outBuf=ByteBuffer.allocate(8);

try{
String srcStr;
String destStr;
while(true){

if (replenish(inChannel,inBuf)==-1) break;
srcStr=((ByteBuffer)(inBuf.flip())).asCharBuffer().toString();
inBuf.clear();
if (flag)
destStr=des.enc(srcStr,srcStr.length());
else
destStr=des.dec(srcStr,srcStr.length());
outBuf.clear();
if (destStr.length()==4){
for (int i = 0; i<4; i++) {
outBuf.putChar(destStr.charAt(i));
}
outBuf.flip();
}else{
outBuf.position(0);
outBuf.limit(2*destStr.length());
for (int i = 0; i<destStr.length(); i++) {
outBuf.putChar(destStr.charAt(i));
}
outBuf.flip();
}

try {
outChannel.write(outBuf);
outBuf.clear();
}catch (java.io.IOException ex) {
ex.printStackTrace(System.err);
}
}
System.out.println (inChannel.size());
System.out.println (outChannel.size());
System.out.println ("EoF reached.");
inFile.close();
outputFile.close();
}catch(java.io.IOException e){
e.printStackTrace(System.err);
System.exit(1);
}
}

public FileDES(String srcFileName,String destFileName,String inKey,boolean actionType){
this.srcFileName=srcFileName;
this.destFileName=destFileName;
this.actionType=actionType;
analyzePath();
srcFile=new File(srcFileName);
destFile=new File(destFileName);
this.inKey=inKey;
if (actionType==enc)
file_operate(enc);
else
file_operate(dec);
}

public static void main(String[] args){
String file1=System.getProperty("user.dir")+"/111.doc";
String file2=System.getProperty("user.dir")+"/222.doc";
String file3=System.getProperty("user.dir")+"/333.doc";
String passWord="1234ABCD";
FileDES fileDes=new FileDES(file1,file2,passWord,true);
FileDES fileDes1=new FileDES(file2,file3,passWord,false);
}

6. 用java實現DES加密演算法,細致點,要直接粘貼進平台能運行的!!

/*des密鑰生成代碼*/
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.security.spec.InvalidKeySpecException;

import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.DESKeySpec;

import com.huateng.util.common.Log;

public class GenKey {

private static final String DES = "DES";
public static final String SKEY_NAME = "key.des";

public static void genKey1(String path) {

// 密鑰
SecretKey skey = null;
// 密鑰隨機數生成
SecureRandom sr = new SecureRandom();
//生成密鑰文件
File file = genFile(path);

try {
// 獲取密鑰生成實例
KeyGenerator gen = KeyGenerator.getInstance(DES);
// 初始化密鑰生成器
gen.init(sr);
// 生成密鑰
skey = gen.generateKey();
// System.out.println(skey);

ObjectOutputStream oos = new ObjectOutputStream(
new FileOutputStream(file));
oos.writeObject(skey);
oos.close();
Log.sKeyPath(path);
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}

/**
* @param file : 生成密鑰的路徑
* SecretKeyFactory 方式生成des密鑰
* */
public static void genKey2(String path) {
// 密鑰隨機數生成
SecureRandom sr = new SecureRandom();
// byte[] bytes = {11,12,44,99,76,45,1,8};
byte[] bytes = sr.generateSeed(20);
// 密鑰
SecretKey skey = null;
//生成密鑰文件路徑
File file = genFile(path);

try {
//創建deskeyspec對象
DESKeySpec desKeySpec = new DESKeySpec(bytes,9);
//實例化des密鑰工廠
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(DES);
//生成密鑰對象
skey = keyFactory.generateSecret(desKeySpec);
//寫出密鑰對象
ObjectOutputStream oos = new ObjectOutputStream(
new FileOutputStream(file));
oos.writeObject(skey);
oos.close();
Log.sKeyPath(path);
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (InvalidKeyException e) {
e.printStackTrace();
} catch (InvalidKeySpecException e) {
e.printStackTrace();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}

}

private static File genFile(String path) {
String temp = null;
File newFile = null;
if (path.endsWith("/") || path.endsWith("\\")) {
temp = path;
} else {
temp = path + "/";
}

File pathFile = new File(temp);
if (!pathFile.exists())
pathFile.mkdirs();

newFile = new File(temp+SKEY_NAME);

return newFile;
}
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
genKey2("E:/a/aa/");
}

}
/*加解密*/
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.ObjectInputStream;

import javax.crypto.Cipher;
import javax.crypto.CipherInputStream;
import javax.crypto.SecretKey;
public class SecUtil {
public static void decrypt(String keyPath, String source, String dest) {
SecretKey key = null;
try

{
ObjectInputStream keyFile = new ObjectInputStream(
//讀取加密密鑰
new FileInputStream(keyPath));
key = (SecretKey) keyFile.readObject();
keyFile.close();
}
catch (FileNotFoundException ey1) {

throw new RuntimeException(ey1);
}
catch (Exception ey2) {
throw new RuntimeException(ey2);
}
//用key產生Cipher
Cipher cipher = null;
try {
//設置演算法,應該與加密時的設置一樣
cipher = Cipher.getInstance("DES");
//設置解密模式
cipher.init(Cipher.DECRYPT_MODE, key);
}
catch (Exception ey3) {
throw new RuntimeException(ey3);
}
//取得要解密的文件並解密
File file = new File(source);
String filename = file.getName();
try {
//輸出流,請注意文件名稱的獲取
BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(dest));
//輸入流
CipherInputStream in = new CipherInputStream(new BufferedInputStream(
new FileInputStream(file)), cipher);
int thebyte = 0;
while ( (thebyte = in.read()) != -1) {
out.write(thebyte);
}
in.close();
out.close();
}
catch (Exception ey5) {
throw new RuntimeException(ey5);
}
}

public static void encrypt(String keyPath, String source, String dest) {
SecretKey key = null;
try

{
ObjectInputStream keyFile = new ObjectInputStream(
//讀取加密密鑰
new FileInputStream(keyPath));
key = (SecretKey) keyFile.readObject();
keyFile.close();
}
catch (FileNotFoundException ey1) {
throw new RuntimeException(ey1);
}
catch (Exception ey2) {
throw new RuntimeException(ey2);
}
//用key產生Cipher
Cipher cipher = null;
try {
//設置演算法,應該與加密時的設置一樣
cipher = Cipher.getInstance("DES");
//設置解密模式
cipher.init(Cipher.ENCRYPT_MODE, key);
}
catch (Exception ey3) {
throw new RuntimeException(ey3);
}
//取得要解密的文件並解密
File file = new File(source);
String filename = file.getName();
try {
//輸出流,請注意文件名稱的獲取
BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(dest));
//輸入流
CipherInputStream in = new CipherInputStream(new BufferedInputStream(
new FileInputStream(file)), cipher);
int thebyte = 0;
while ( (thebyte = in.read()) != -1) {
out.write(thebyte);
}
in.close();
out.close();
}
catch (Exception ey5) {
throw new RuntimeException(ey5);
}
}
}

7. 如題,求Java的DES演算法代碼,可以用於解密用C語言寫的DES加密演算法!其中C語言代碼見問題補充

俺就是來幫助你這樣可愛的人。俺可是花了幾年的時間費了多大的力氣才能把這個東西弄出來!

DES加密還沒有AES嚴密:

packagecom.palic.pss.afcs.worldthrough.common.util;
importjavax.crypto.Cipher;
importjavax.crypto.spec.SecretKeySpec;
importrepack.com.thoughtworks.xstream.core.util.Base64Encoder;
/**
*AES加密解密
*@author
*
*/
publicclassAesUtils{
publicstaticfinalStringcKey="assistant7654321";
/**
*加密--把加密後的byte數組先進行二進制轉16進制在進行base64編碼
*@paramsSrc
*@paramsKey
*@return
*@throwsException
*/
publicstaticStringencrypt(StringsSrc,StringsKey)throwsException{
if(sKey==null){
("ArgumentsKeyisnull.");
}
if(sKey.length()!=16){
(
"ArgumentsKey'lengthisnot16.");
}
byte[]raw=sKey.getBytes("ASCII");
SecretKeySpecskeySpec=newSecretKeySpec(raw,"AES");

Ciphercipher=Cipher.getInstance("AES");
cipher.init(Cipher.ENCRYPT_MODE,skeySpec);

byte[]encrypted=cipher.doFinal(sSrc.getBytes("UTF-8"));
StringtempStr=parseByte2HexStr(encrypted);

Base64Encoderencoder=newBase64Encoder();
returnencoder.encode(tempStr.getBytes("UTF-8"));
}

/**
*解密--先進行base64解碼,在進行16進制轉為2進制然後再解碼
*@paramsSrc
*@paramsKey
*@return
*@throwsException
*/
publicstaticStringdecrypt(StringsSrc,StringsKey)throwsException{

if(sKey==null){
("499");
}
if(sKey.length()!=16){
("498");
}

byte[]raw=sKey.getBytes("ASCII");
SecretKeySpecskeySpec=newSecretKeySpec(raw,"AES");

Ciphercipher=Cipher.getInstance("AES");
cipher.init(Cipher.DECRYPT_MODE,skeySpec);

Base64Encoderencoder=newBase64Encoder();
byte[]encrypted1=encoder.decode(sSrc);

StringtempStr=newString(encrypted1,"utf-8");
encrypted1=parseHexStr2Byte(tempStr);
byte[]original=cipher.doFinal(encrypted1);
StringoriginalString=newString(original,"utf-8");
returnoriginalString;
}

/**
*將二進制轉換成16進制
*
*@parambuf
*@return
*/
(bytebuf[]){
StringBuffersb=newStringBuffer();
for(inti=0;i<buf.length;i++){
Stringhex=Integer.toHexString(buf[i]&0xFF);
if(hex.length()==1){
hex='0'+hex;
}
sb.append(hex.toUpperCase());
}
returnsb.toString();
}

/**
*將16進制轉換為二進制
*
*@paramhexStr
*@return
*/
publicstaticbyte[]parseHexStr2Byte(StringhexStr){
if(hexStr.length()<1)
returnnull;
byte[]result=newbyte[hexStr.length()/2];
for(inti=0;i<hexStr.length()/2;i++){
inthigh=Integer.parseInt(hexStr.substring(i*2,i*2+1),16);
intlow=Integer.parseInt(hexStr.substring(i*2+1,i*2+2),
16);
result[i]=(byte)(high*16+low);
}
returnresult;
}
publicstaticvoidmain(String[]args)throwsException{
/*
*加密用的Key可以用26個字母和數字組成,最好不要用保留字元,雖然不會錯,至於怎麼裁決,個人看情況而定
*/
StringcKey="assistant7654321";
//需要加密的字串
StringcSrc="123456";
//加密
longlStart=System.currentTimeMillis();
StringenString=encrypt(cSrc,cKey);
System.out.println("加密後的字串是:"+enString);
longlUseTime=System.currentTimeMillis()-lStart;
System.out.println("加密耗時:"+lUseTime+"毫秒");
//解密
lStart=System.currentTimeMillis();
StringDeString=decrypt(enString,cKey);
System.out.println("解密後的字串是:"+DeString);
lUseTime=System.currentTimeMillis()-lStart;
System.out.println("解密耗時:"+lUseTime+"毫秒");
}
}

8. 誰能幫我將java中的DES演算法改成用C#來實現

C#也有DES加密。

using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;

/// <summary>
/// DES加密解密
/// </summary>
public static class DES
{

//默認密鑰向量
private static byte[] Keys = { 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF };

/// <summary>
/// DES加密字元串
/// </summary>
/// <param name="encryptString">待加密的字元串</param>
/// <param name="encryptKey">加密密鑰,要求為8位</param>
/// <returns>加密成功返回加密後的字元串,失敗返回源串</returns>
public static string Encode(string encryptString, string encryptKey)
{
encryptKey = StringHelper.GetSubString(encryptKey, 8, "");
encryptKey = encryptKey.PadRight(8, ' ');
byte[] rgbKey = Encoding.UTF8.GetBytes(encryptKey.Substring(0, 8));
byte[] rgbIV = Keys;
byte[] inputByteArray = Encoding.UTF8.GetBytes(encryptString);
DESCryptoServiceProvider dCSP = new DESCryptoServiceProvider();
MemoryStream mStream = new MemoryStream();
CryptoStream cStream = new CryptoStream(mStream, dCSP.CreateEncryptor(rgbKey, rgbIV), CryptoStreamMode.Write);
cStream.Write(inputByteArray, 0, inputByteArray.Length);
cStream.FlushFinalBlock();
return Convert.ToBase64String(mStream.ToArray());

}

/// <summary>
/// DES解密字元串
/// </summary>
/// <param name="decryptString">待解密的字元串</param>
/// <param name="decryptKey">解密密鑰,要求為8位,和加密密鑰相同</param>
/// <returns>解密成功返回解密後的字元串,失敗返源串</returns>
public static string Decode(string decryptString, string decryptKey)
{
try
{
decryptKey = StringHelper.GetSubString(decryptKey, 8, "");
decryptKey = decryptKey.PadRight(8, ' ');
byte[] rgbKey = Encoding.UTF8.GetBytes(decryptKey);
byte[] rgbIV = Keys;
byte[] inputByteArray = Convert.FromBase64String(decryptString);
DESCryptoServiceProvider DCSP = new DESCryptoServiceProvider();

MemoryStream mStream = new MemoryStream();
CryptoStream cStream = new CryptoStream(mStream, DCSP.CreateDecryptor(rgbKey, rgbIV), CryptoStreamMode.Write);
cStream.Write(inputByteArray, 0, inputByteArray.Length);
cStream.FlushFinalBlock();
return Encoding.UTF8.GetString(mStream.ToArray());
}
catch
{
return "";
}

}

}

閱讀全文

與des演算法java代碼相關的資料

熱點內容
程序員被公司勸退 瀏覽:523
java三子棋 瀏覽:690
加密空間怎麼強制進入 瀏覽:343
ug分割曲線命令 瀏覽:209
學碼思程序員 瀏覽:609
自考雲學習app為什麼登不上 瀏覽:406
domcer伺服器晝夜更替怎麼搞 瀏覽:434
plc和單片機哪個好 瀏覽:535
帝國神話組建雲伺服器 瀏覽:827
鄧散木pdf 瀏覽:199
方舟怎麼直連伺服器圖片教程 瀏覽:563
假相pdf 瀏覽:336
找對象找程序員怎麼找 瀏覽:976
怎麼投訴蘋果商店app 瀏覽:470
華為手機如何看有多少個app 瀏覽:734
btr如何管理別的伺服器 瀏覽:410
spwm軟體演算法 瀏覽:184
70多歲單身程序員 瀏覽:221
高考考前解壓拓展訓練 瀏覽:217
用紙做解壓玩具不用澆水 瀏覽:584