當前位置:首頁 » 密碼管理 » base64在線加密解密

base64在線加密解密

發布時間: 2022-09-06 08:02:23

㈠ base64的解密,求助。(懸賞20)

<?php // This file is protected by right law and provided under license. Reverse engineering of this file is strictly prohibited.
$OOO0O0O00=__FILE__;$O00O00O00=__LINE__;$OO00O0000=5200;eval($O000O0O00=fopen($OOO0O0O00,'rb');while(--$O00O00O00)fgets($O000O0O00,1024);fgets($O000O0O00,4096);$OO00O00O0=(base64_decode(strtr(fread($O000O0O00,372),'+/=','+/')));eval($OO00O00O0);));return;?>

拜託,我直接給的完整的PHP!
niulu90隻是給你一個解密的程序,還要你自己去編。

㈡ 電信光貓寬頻密碼f12被加密

1、用光貓上的賬戶登錄電信設備,登錄成功之後,在瀏覽器上輸入網址,這樣瀏覽器會自動下載一個backupsettings.conf的文件。
2、從下載下來的backupsettings.conf文件中獲取密碼,用文本編輯器打開下載下來的文件,打開之後搜索以下TeleComAccount或者telecomadmin欄位,在下面RUS982h1NwA=中就是密碼:RUS982h1NwA=,不過,它默認是加密了的,需要我們自己解密。
3、解密加密的密碼,由於密碼是用簡單的base64進行加密的,我們網路搜索以下Base64加密網站即可解密,比如Base64在線解密,解密之後就是真正的密碼了:EDhu7。
4、用解密的密碼,還有telecomadmin用戶名進行登錄即可,登錄成功那就大功告成了。

㈢ 如何判斷一個字元串是否經過base64加密過

很簡單,解base64是個P問題,找一個在線的base64解密網站,解密。能解出來就是,解不出來,就不是。
唯一的麻煩可能是要選擇字元集。
​1.標准base64隻有64個字元(英文大小寫、數字和+、/)以及用作後綴等號;
2.base64是把3個位元組變成4個可列印字元,所以base64編碼後的字元串一定能被4整除(不算用作後綴的等號);
3.等號一定用作後綴,且數目一定是0個、1個或2個。這是因為如果原文長度不能被3整除,base64要在後面添加\0湊齊3n位。為了正確還原,添加了幾個\0就加上幾個等號。顯然添加等號的數目只能是0、1或2;
4.嚴格來說base64不能算是一種加密,只能說是編碼轉換。使用base64的初衷。是為了方便把含有不可見字元串的信息用可見字元串表示出來,以便復制粘貼;

㈣ 關於WebSafeBase64的加密和解密,求解答

前端使用js: pwd = new Base64.encode(pwd);
後端使用java, new Base64().decodeBase64(pwd.getBytes()).toString();
java的Base64()有提供decode和decodeBase64()這倆種方法,我習慣的以為是decode(),結果卻是後者.

㈤ 關於base64、md5等加密解密問題

base64的作用不是加密,而是用來避免「位元組」中不能轉換成可顯示字元的數值。
比如0-32的控制字元,空格,製表符都不能被列印在紙上,base64隻使用大寫小寫數字標點。
可以列印在紙上,數據可以在傳統平面媒介上攜帶。

md5是散列函數,提取數據的特徵,輸出是不可逆的散列值,用於代表某信息A而又不暴露信息A的內容。不直接用於加密文件。

㈥ JAVA怎麼樣實現Base64加密解密

package test;
import java.io.IOException;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;

public class Test {
public static void main(String[] args) {
String str = "java12345";
String ret = null;
ret = new BASE64Encoder().encode(str.getBytes());
System.out.println("加密前:"+str+" 加密後:"+ret);
str = "amF2YTEyMzQ1";
try {
ret = new String(new BASE64Decoder().decodeBuffer(str));
} catch (IOException e) {
e.printStackTrace();
}
System.out.println("解密前:"+str+" 解密後:"+ret);
}
}

㈦ 怎麼解決js解碼base64中文亂碼問題

最近在做一個插件開發,我用c++在插件裡面把帶中文的字元串用base64演算法加密後推給網頁的js去解碼,解出來的相信大家預料到了,洋文一字不差,中文就TMD的都是亂碼。
google了一下,也沒找到能解決問題的方法,沒辦法只好自己研究了。後來發現問題原因了,編碼過程肯定是沒有問題的,看到前面加顏色那段字了沒,就是我解出來的編碼雖然是utf8,但是將中文文字進行Base64編碼再解碼後,重新排列編碼的時候,往往就會出現亂碼,UTF8頁面的編碼實際還是用UTF-16存儲的。應該在解碼後把UTF8還原為UTF-16格式。這樣就能真正搞定javascript解密中文base64編碼的問題了。
這里我就把js解碼代碼貼出來,給廣大同胞:
/**
* Waitang.com
*/
var base64EncodeChars = "+/";
var base64DecodeChars = new Array(
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
-1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1);
//base64編碼
function base64encode(str) {
var out, i, len;
var c1, c2, c3;
len = str.length;
i = 0;
out = "";
while(i < len) {
c1 = str.charCodeAt(i++) & 0xff;
if(i == len)
{
out += base64EncodeChars.charAt(c1 >> 2);
out += base64EncodeChars.charAt((c1 & 0x3) << 4);
out += "==";
break;
}
c2 = str.charCodeAt(i++);
if(i == len)
{
out += base64EncodeChars.charAt(c1 >> 2);
out += base64EncodeChars.charAt(((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4));
out += base64EncodeChars.charAt((c2 & 0xF) << 2);
out += "=";
break;
}
c3 = str.charCodeAt(i++);
out += base64EncodeChars.charAt(c1 >> 2);
out += base64EncodeChars.charAt(((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4));
out += base64EncodeChars.charAt(((c2 & 0xF) << 2) | ((c3 & 0xC0) >>6));
out += base64EncodeChars.charAt(c3 & 0x3F);
}
return out;
}
//base64解碼
function base64decode(str) {
var c1, c2, c3, c4;
var i, len, out;
len = str.length;
i = 0;
out = "";
while(i < len) {
/* c1 */
do {
c1 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
} while(i < len && c1 == -1);
if(c1 == -1)
break;
/* c2 */
do {
c2 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
} while(i < len && c2 == -1);
if(c2 == -1)
break;
out += String.fromCharCode((c1 << 2) | ((c2 & 0x30) >> 4));
/* c3 */
do {
c3 = str.charCodeAt(i++) & 0xff;
if(c3 == 61)
return out;
c3 = base64DecodeChars[c3];
} while(i < len && c3 == -1);
if(c3 == -1)
break;
out += String.fromCharCode(((c2 & 0XF) << 4) | ((c3 & 0x3C) >> 2));
/* c4 */
do {
c4 = str.charCodeAt(i++) & 0xff;
if(c4 == 61)
return out;
c4 = base64DecodeChars[c4];
} while(i < len && c4 == -1);
if(c4 == -1)
break;
out += String.fromCharCode(((c3 & 0x03) << 6) | c4);
}
return out;
}

這是轉換utf8到utf16的代碼:

/**
* Yovae.com
*/
//utf-8轉utf16
function utf16to8(str) {
var out, i, len, c;
out = "";
len = str.length;
for(i = 0; i < len; i++) {
c = str.charCodeAt(i);
if ((c >= 0x0001) && (c <= 0x007F)) {
out += str.charAt(i);
} else if (c > 0x07FF) {
out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F));
out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
} else {
out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));
out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
}
}
return out;
}
//utf-16轉utf-8
function utf8to16(str) {
var out, i, len, c;
var char2, char3;
out = "";
len = str.length;
i = 0;
while(i < len) {
c = str.charCodeAt(i++);
switch(c >> 4)
{
case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7:
// 0xxxxxxx
out += str.charAt(i-1);
break;
case 12: case 13:
// 110x xxxx 10xx xxxx
char2 = str.charCodeAt(i++);
out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F));
break;
case 14:
// 1110 xxxx 10xx xxxx 10xx xxxx
char2 = str.charCodeAt(i++);
char3 = str.charCodeAt(i++);
out += String.fromCharCode(((c & 0x0F) << 12) |
((char2 & 0x3F) << 6) |
((char3 & 0x3F) << 0));
break;
}
}
return out;
}

這是c++ base64編碼代碼:

/**
* Yovae.com
*/
CString encode(const CString in_str)
{
const CString _base64_encode_chars = "+/";
CString out_str;
unsigned char c1, c2, c3;
int i = 0;
int len = in_str.GetLength();
while ( i {
c1 = in_str[i++];
if ( i==len )
{
out_str += _base64_encode_chars[ c1>>2 ];
out_str += _base64_encode_chars[ (c1&0x3)<<4 ];
out_str += "==";
break;
}
c2 = in_str[i++];
if ( i==len )
{
out_str += _base64_encode_chars[ c1>>2 ];
out_str += _base64_encode_chars[ ((c1&0x3)<<4) | ((c2&0xF0)>>4) ];
out_str += _base64_encode_chars[ (c2&0xF)<<2 ];
out_str += "=";
break;
}

c3 = in_str[i++];
out_str += _base64_encode_chars[ c1>>2 ];
out_str += _base64_encode_chars[ ((c1&0x3)<<4) | ((c2&0xF0)>>4) ];
out_str += _base64_encode_chars[ ((c2&0xF)<<2) | ((c3&0xC0)>>6) ];
out_str += _base64_encode_chars[ c3&0x3F ];
}
return out_str;
}

㈧ 如何使用Base64進行加密和解密

其實Base64的加密和解密的演算法不是很復雜,首先是定義自己64位的密鑰,64個字元是固定,但是順序是可以隨自己的設計而變化。例如:
char[] BaseTable=new char[64]{
'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z',
'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',
'0','1','2','3','4','5','6','7','8','9','+','/'};

接下來,在加密的時候就是對於需要加密的每個字元,通過一定的演算法,轉換成上面64字元的一種;而在解密的時候則是把64字元中任意一個字元反算出加密前的字元。對於每個字元的操作有很多方法,這里就不一一介紹了。需要注意的是「=」字元,在Base64加密演算法中,是很重要的,它是起到補零作用。

以下是完整代碼:
//----------------------------- Base64 class --------------------------------------
//---------------------------------------------------------------------------------
//---File:clsBase64
//---Description:The class file to encode string or decode string in base algorith
//---Author:Knight
//---Date:Oct.8, 2005
//---------------------------------------------------------------------------------
//----------------------------{ Base64 class }-------------------------------------
using System;

namespace Base64
{
/// <summary>
/// Summary description for clsBase64.
/// </summary>
public class clsBase64
{
private char[] source;
private char[] lookupTable;
private int length, length2, length3;
private int blockCount;
private int paddingCount;

public clsBase64()
{
//
// TODO: Add constructor logic here
//
source = null;
length = length2 = length3 =0;
blockCount = 0;
paddingCount = 0;
}

/// <summary>
/// Create base64 char array using default base64 char array
/// </summary>
/// <param name="CreatePara"></param>
/// <returns>return the new base64 char array</returns>
private char[] CreateBase64Char( ref char[] CreatePara )
{
char[] BaseTable=new char[64]{
'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z',
'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z',
'0','1','2','3','4','5','6','7','8','9','+','/'};

const int CREATE_TYPE = 8;
byte bParaValue = 0;
byte bTemp;
for( int i = 0; i < CreatePara.Length; i++ )
{
bTemp = ( byte )( CreatePara[i] );
switch( bTemp % CREATE_TYPE )
{
case 1:
// 00000001
bTemp =( byte )( bTemp ^ 0x01 );
break;
case 2:
// 00000010
bTemp =( byte )( bTemp ^ 0x02 );
break;
case 3:
// 00000100
bTemp =( byte )( bTemp ^ 0x04 );
break;
case 4:
// 00001000
bTemp =( byte )( bTemp ^ 0x08 );
break;
case 5:
// 00010000
bTemp =( byte )( bTemp ^ 0x10 );
break;
case 6:
// 00100000
bTemp =( byte )( bTemp ^ 0x20 );
break;
case 7:
// 01000000
bTemp =( byte )( bTemp ^ 0x40 );
break;
default:
// 10000000
bTemp =( byte )( bTemp ^ 0x80 );
break;
}
bParaValue =( byte )( bParaValue ^ bTemp );
}

char chrTemp;
int nIndex;
switch( bParaValue % CREATE_TYPE )
{
case 1:
// Exechange 0 <--> 1, 2 <--> 3, 4 <--> 5, 6 <--> 7
for( int i = 0; i < BaseTable.Length / CREATE_TYPE; i++ )
{
nIndex = i * CREATE_TYPE;
chrTemp = BaseTable[nIndex];
BaseTable[nIndex] = BaseTable[nIndex + 1];
BaseTable[nIndex + 1] = chrTemp;
chrTemp = BaseTable[nIndex + 2];
BaseTable[nIndex + 2] = BaseTable[nIndex + 3];
}
//remove paddings
length3=length2-paddingCount;
byte[] result=new byte[length3];

for(int x=0;x<length3;x++)
{
result[x]=buffer2[x];
}

return result;
}

private byte char2sixbit(char c)
{
if( c=='=' )
return 0;
else
{
for (int x=0;x<64;x++)
{
if (lookupTable[x]==c)
return (byte)x;
}
//should not reach here
return 0;
}
}

}
}

㈨ php base64加密解密

你用錯了環境。
base64_encode和base64_decode是用來對 「網址」 中存在的特殊字元進行轉碼和解碼,保證傳輸過程的正確性。和urlencode和urldecode類似。

在php里就屬於url處理的函數。

㈩ php base64 decode 解密

?> <div id="footer" class="clearfix">
<div class="right left">&; 2009 THEME NAME. POWERED BY <a href="http://wordpress.org">WORDPRESS</a> AND <a href="http://wpcrunchy.com" title="Free and Premium Wordpress Themes">WPCRUNCHY</a></div>
<div class="credits right">Design by <a href="http://www.firecasinos.com" target="_blank">Online Casinos</a>. In collaboration with <a href="http://mmohut.com" target="_blank">Free MMORPG</a>, <a href="http://www.hostv.com" target="_blank">VPS Hosting</a> and <a href="http://www.cirtexhosting.com/video-hosting.shtml" target="_blank">Video Hosting</a></div>
</div>
</div>
<?php wp_footer(); ?>
<!--[if IE 6]>
<script>for (x in document.write) { document.write(x);}</script>
<![endif]-->
</body>
</html>

就是一段這個破東西。

熱點內容
vsgcc編譯器 發布:2025-07-05 00:48:03 瀏覽:901
長城h6第三代都有哪些配置 發布:2025-07-05 00:39:25 瀏覽:396
unix系統編程手冊 發布:2025-07-05 00:32:17 瀏覽:286
重慶壓縮機廠 發布:2025-07-05 00:14:53 瀏覽:757
php55兼容 發布:2025-07-05 00:14:52 瀏覽:545
公主出國訪問 發布:2025-07-05 00:13:26 瀏覽:570
伺服器IP作為登錄IP 發布:2025-07-05 00:10:56 瀏覽:979
防雷支架應配置什麼電纜 發布:2025-07-05 00:05:56 瀏覽:220
iosc語言函數 發布:2025-07-05 00:02:40 瀏覽:994
android打飛機 發布:2025-07-04 23:59:34 瀏覽:210