青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

   

1CM

  

Base64Encode & Base64Decode

unsigned???char*???_stdcall???Base64Encode(const???char???*str , int???length)?
{???
????//int???length???
= ???strlen(str) ; ?
????static???char???base64_table [] ??? = ?????
????{??
????????'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 ' , ???'+' , ???'/' , ???'\ 0 '?????
????}
;
????static???char???base64_pad??? = ???' = ' ; ?????
????unsigned???const???char???*current??? = ???(unsigned???const???char*)str ; ???
????int???i??? = ??? 0 ; ?????
????unsigned???char???*result??? = ???(unsigned???char???*)malloc(((length???+??? 3 ???-???length???%??? 3 )???*??? 4 ???/??? 3 ???+??? 1 )???*???sizeof(char)) ; ?????
????while???(length???>??? 2 )???{???/*???keep???going???until???we???have???less???than??? 24 ???bits???*/???
????????result
[ i++ ] ??? = ???base64_table [ current[0 ] ???>>??? 2 ] ; ?
????????result [ i++ ] ??? = ???base64_table [ ((current[0 ] ???&???0x03)???<<??? 4 )???+???(current [ 1 ] ???>>??? 4 )] ; ?????
????????result [ i++ ] ??? = ???base64_table [ ((current[1 ] ???&???0x0f)???<<??? 2 )???+???(current [ 2 ] ???>>??? 6 )] ; ?????
????????result [ i++ ] ??? = ???base64_table [ current[2 ] ???&???0x3f] ; ?????
????????current???+ = ??? 3 ; ?????
????????length???- = ??? 3 ; ???/*???we???just???handle???3???octets???of???data???*/?????
????}?????
????/*???now???deal???with???the???tail???end???of???things???*/?????
????if???(length???!
= ??? 0 )???{?????
????????result
[ i++ ] ??? = ???base64_table [ current[0 ] ???>>??? 2 ] ; ?????
????????if???(length???>??? 1 )???{?????
????????????result
[ i++ ] ??? = ???base64_table [ ((current[0 ] ???&???0x03???)???<<??? 4 )???+???(current [ 1 ] ???>>??? 4 )] ; ?????
????????????result [ i++ ] ??? = ???base64_table [ (current[1 ] ???&???0x0f)???<<??? 2 ] ; ???result[i++]???=???base64_pad;???
????????}???
????????else???{???
????????????result
[ i++ ] ??? = ???base64_table [ (current[0 ] ???&???0x03)???<<??? 4 ] ; ???
????????????result [ i++ ] ??? = ???base64_pad ; ???
????????????result [ i++ ] ??? = ???base64_pad ; ???
????????}???
????}???
????result
[ i ] ??? = ???'\ 0 ' ; ???//???printf("%s\n",result);???
????return???result ; ???
}

unsigned???char*???_stdcall???Base64Decode(const???unsigned???char???*str
, ???int???length , ???int???*ret_length)
{?
????static???char???base64_table
[] ??? = ?????
????{??
????????'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 ' , ???'+' , ???'/' , ???'\ 0 '?????
????}
; ?
????static???char???base64_pad??? = ???' = ' ; ?
????const???unsigned???char???*current??? = ???str ; ?
????int???ch , ???i??? = ??? 0 , ???j??? = ??? 0 , ???k ; ?
????/*???this???sucks???for???threaded???environments???*/?
????static???short???reverse_table
[ 256 ] ; ?
????static???int???table_built ; ?
????unsigned???char???*result ; ?
???
????if???(++table_built???
== ??? 1 )???{?
????????char???*chp
; ?
????????for(ch??? = ??? 0 ; ???ch???<???256;???ch++)???{?
????????????chp??? = ???strchr(base64_table , ???ch) ; ?
????????????if(chp)???{?
????????????????reverse_table
[ ch ] ??? = ???chp???-???base64_table ; ?
????????????}???else???{?
????????????????reverse_table
[ ch ] ??? = ???- 1 ; ?
????????????}?
????????}?
????}?
???
????result???
= ???(unsigned???char???*)malloc(length???+??? 1 ) ; ?
????if???(result??? == ???NULL)???{?
????????return???NULL
; ?
????}?
???
????/*???run???through???the???whole???string
, ???converting???as???we???go???*/?
????while???((ch???
= ???*current++)???! = ???'\ 0 ')???{?
????????if???(ch???
== ???base64_pad)???break ; ?
???????
????????/*???When???Base64???gets???POSTed
, ???all???pluses???are???interpreted???as???spaces.?
????????This???line???changes???them???back.?????It's???not???exactly???the???Base64???spec
, ?
????????but???it???is???completely???compatible???with???it???(the???spec???says???that?
????????spaces???are???invalid).?????This???will???also???save???many???people???considerable?
????????headache.?????-???Turadg???Aleahmad???<turadg@wise.berkeley.edu>?
????????*/?
???????
????????if???(ch???
== ???'???')???ch??? = ???'+' ; ???
???????
????????ch???
= ???reverse_table [ ch ] ; ?
????????if???(ch???<??? 0 )???continue ; ?
???????
????????switch(i???%???
4 )???{?
????????case???
0 :?
????????????result
[ j ] ??? = ???ch???<<??? 2 ; ?
????????????break ; ?
????????case??? 1 :?
????????????result
[ j++ ] ???| = ???ch???>>??? 4 ; ?
????????????result [ j ] ??? = ???(ch???&???0x0f)???<<??? 4 ; ?
????????????break ; ?
????????case??? 2 :?
????????????result
[ j++ ] ???| = ???ch???>> 2 ; ?
????????????result [ j ] ??? = ???(ch???&???0x03)???<<??? 6 ; ?
????????????break ; ?
????????case??? 3 :?
????????????result
[ j++ ] ???| = ???ch ; ?
????????????break ; ?
????????}?
????????i++
; ?
????}?
???
????k???
= ???j ; ?
????/*???mop???things???up???if???we???ended???on???a???boundary???*/?
????if???(ch???
== ???base64_pad)???{?
????????switch(i???%???
4 )???{?
????????case???
0 :?
????????case???
1 :?
????????????free(result)
; ?
????????????return???NULL ; ?
????????case??? 2 :?
????????????k++
; ?
????????case??? 3 :?
????????????result
[ k++ ] ??? = ??? 0 ; ?
????????}?
????}?
????if(ret_length)???{?
????????*ret_length???
= ???j ; ?
????}?
????result
[ k ] ??? = ???'\ 0 ' ; ?
????return???result ; ?
}

posted on 2008-02-21 10:31 1CM 閱讀(1808) 評(píng)論(3)  編輯 收藏 引用

評(píng)論

# re: Base64Encode & Base64Decode 2008-08-15 13:44 求助

sfXjDyReveCmjocpalXyOfUbWtXkKmZwskUmOtUstjnqIc5dwqUu9b5plznojaUjswmjNpCmvvnnXynqXvZyiwUctlUs8wUxvbXnMlXzDamqcuUdRhdcssBpPqkpIrnktnnrVzXntm5uZpmrQmnzFnUducAt9nZxxsnoVvXaLrZr9lnl8yndqj5xshRwFiZrWxZsuqjnzwjvzgXy9dUgMfXkptntbeUfskUvMmXbbiZzEcZlaqXkeamyeyUxzaAszp5sthRvknbwqxmzzvXhrwXlQdkbQvnfzbXwrdjieaXzxtnmtajlxrAytpAysrjt6gUaFyZvXfUdQpRzNmmpUnXtKuZcQmXnBs5xzukjOrUaZkZufrnmObng5gmf7inaNxRaPqjwawne8gmhodnpoxXtAlXcRd9ovcnewlZqubAiVbUuDiUtPsnhbxZgHzmbwombmhmeunnlfxXi
求您幫我解密。
先謝謝了!
qq:63519422  回復(fù)  更多評(píng)論   

# re: Base64Encode & Base64Decode 2008-08-25 21:20 hello

@求助
B1F5E30F245EBDE0A68E87296A55F239F51B5AD5E42A6670B245263AD52CB639EA21CE5DC2A52EF5
BE699739E88DA523B309A33690A6BEF9E75F29EA5EF6728B051CB6552CF30531BDB5E73255F30DA9
AA72E51D46175CB2C0693EA92922B9E4B679EB5735E7B66E6E6699AB4269F316751DB9C02DF67671
C6C9E856F5DA2EB66BF659E5F329DDAA3E71B2147016266B5B166CBAA8E7CF08EFCE05F2F5D52031
F5E4A6D9ED6DE51FB2452F3265DB6E267311C6656AA5E479A9B27B2531CDA02CCE9E6CB6146F9276
F0AB19B3CEF5E1AF05E541D91B42F9DFCDB5F0ADD8E279A5F3C6D9E6B5A8E5C6B032B69032B2B8ED
EA051A17266F5DF51D4294733669A95275ED2AE65C4265E706CE71CEE9233AB51A66466E7EB9E639
B9E0E6099FEE29DA37145A3EA8F06B09DEF209A1A1D9E9A315ED0255DC45DF68BDC9DEC2566AB9B0
2255B52E0E252D3EC9E16F16601F399BC2899B9A199EBA79E57F15E2  回復(fù)  更多評(píng)論   

# re: Base64Encode & Base64Decode 2008-10-07 12:23 lh

非常感謝!  回復(fù)  更多評(píng)論   


只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問(wèn)   Chat2DB   管理


青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            免费在线观看一区二区| 夜色激情一区二区| 亚洲在线播放电影| 狠狠色狠狠色综合日日五| 欧美久久久久中文字幕| 欧美有码视频| 亚洲视频1区2区| 亚洲黄色在线| 免费成人激情视频| 久久精品国语| 欧美淫片网站| 亚洲欧美另类久久久精品2019| 亚洲国产精品美女| 国际精品欧美精品| 国产日韩欧美视频在线| 国产精品v日韩精品| 欧美激情一区二区三区成人| 久久久免费精品视频| 午夜精品免费| 亚洲一区不卡| 一本一本久久a久久精品综合麻豆| 欧美成人免费在线观看| 老司机午夜精品视频在线观看| 亚洲欧美在线高清| 亚洲在线免费| 亚洲一区二区三区欧美 | 午夜免费在线观看精品视频| 亚洲乱码国产乱码精品精| 亚洲国产一成人久久精品| 在线欧美日韩国产| 黄色成人精品网站| 国内精品视频在线播放| 国产午夜亚洲精品不卡| 国产日韩欧美不卡| 国产一区二区三区四区三区四| 国产欧美日韩综合| 国产综合色在线| 国产一区二区精品在线观看| 国产视频久久| 黄色另类av| 亚洲国产精品第一区二区三区| 在线看日韩av| 91久久精品国产91久久性色tv | 亚洲欧美精品在线观看| 西西人体一区二区| 久久精品国产一区二区三区免费看 | 国产情侣一区| 国产综合欧美| 亚洲成色最大综合在线| 亚洲精品国产欧美| 夜夜精品视频一区二区| 亚洲一区二区三区在线观看视频| 亚洲淫片在线视频| 久久精品水蜜桃av综合天堂| 久久综合国产精品台湾中文娱乐网| 久久综合色播五月| 亚洲韩日在线| 国产精品99久久久久久www| 亚洲综合三区| 久久久久一区二区三区| 欧美精品日韩综合在线| 国产精品sm| 国产一区二区三区电影在线观看| 极品av少妇一区二区| 日韩视频在线观看一区二区| 亚洲免费影视| 蜜桃av噜噜一区二区三区| 亚洲激情另类| 西瓜成人精品人成网站| 另类av导航| 国产精品久久久久久亚洲调教| 国产一区二区三区高清| 日韩一区二区免费看| 欧美一区网站| 亚洲国语精品自产拍在线观看| 亚洲一区二区三区中文字幕| 久久婷婷综合激情| 国产精品成人av性教育| 激情一区二区| 亚洲专区免费| 欧美国产在线观看| 亚洲一二三区在线观看| 免费在线一区二区| 国产精品视频99| 亚洲剧情一区二区| 久久久噜噜噜久久人人看| 亚洲精品日本| 久久久精品网| 国产精品久久久久久影视| 亚洲国产成人一区| 久久激情婷婷| 一区二区高清在线观看| 噜噜噜噜噜久久久久久91| 国产精品一区亚洲| 99re66热这里只有精品3直播| 欧美在线影院| 夜夜嗨av一区二区三区| 蜜臀av在线播放一区二区三区| 国产精品毛片a∨一区二区三区|国 | 欧美亚洲综合网| 欧美午夜久久久| 亚洲七七久久综合桃花剧情介绍| 欧美一级淫片播放口| 亚洲精品之草原avav久久| 久久久亚洲国产美女国产盗摄| 国产精品www.| 亚洲色无码播放| 亚洲国产一区二区精品专区| 久久久久久久久伊人| 国产三级欧美三级日产三级99| 亚洲一区久久| 日韩视频三区| 欧美久久影院| 亚洲毛片网站| 亚洲二区三区四区| 美女视频黄 久久| 在线电影欧美日韩一区二区私密| 欧美在线观看视频| 亚洲砖区区免费| 国产精品日韩欧美一区二区| 中文国产成人精品久久一| 亚洲日本理论电影| 欧美精品v国产精品v日韩精品| 最新中文字幕一区二区三区| 欧美不卡高清| 蜜乳av另类精品一区二区| 亚洲国产精品悠悠久久琪琪| 久久综合久色欧美综合狠狠 | 久久久久一区二区| 禁久久精品乱码| 久久综合久久88| 久久久久久一区二区| 在线日韩中文字幕| 欧美风情在线观看| 免费久久99精品国产| 亚洲精品美女| 99热这里只有成人精品国产| 欧美精品一区二区三区在线播放 | 日韩一区二区久久| 91久久久久久国产精品| 欧美日韩成人在线| 亚洲一区高清| 欧美亚洲在线观看| 影音先锋中文字幕一区| 亚洲国产精品精华液网站| 欧美日韩国产精品一区| 亚洲一区二区三区激情| 亚洲自拍电影| 激情欧美日韩| 亚洲国产精品电影| 国产精品草莓在线免费观看| 欧美一区二区三区四区在线观看地址 | 欧美性感一类影片在线播放 | 久久国产精品久久久久久久久久 | 91久久精品日日躁夜夜躁欧美| 欧美日韩国产综合视频在线| 亚洲在线观看免费视频| 欧美亚洲一级片| 亚洲国产裸拍裸体视频在线观看乱了| 欧美成人午夜激情在线| 欧美日韩国产综合视频在线观看| 亚洲欧美韩国| 久久天堂av综合合色| 一区二区三区欧美成人| 亚洲欧美一区二区三区久久| 在线成人av| 9人人澡人人爽人人精品| 国产一区二区电影在线观看 | 国产午夜精品一区理论片飘花| 免费视频一区二区三区在线观看| 欧美激情四色| 久久国产精品久久久| 欧美成人一区二区| 香蕉久久夜色精品国产| 老司机aⅴ在线精品导航| 亚洲深夜福利网站| 久久xxxx精品视频| 亚洲最黄网站| 久久久精品网| 亚洲摸下面视频| 猛男gaygay欧美视频| 午夜视频久久久久久| 麻豆成人在线观看| 欧美一区二区三区在线观看| 欧美mv日韩mv国产网站| 欧美一区二区三区成人| 欧美电影在线| 久久综合电影一区| 国产精品久久看| 91久久综合亚洲鲁鲁五月天| 国产一区二区三区视频在线观看| 亚洲精品自在久久| 亚洲成在线观看| 午夜精品久久久久久久久久久久久| 亚洲乱码国产乱码精品精| 久久精品亚洲精品国产欧美kt∨| 亚洲综合第一| 欧美精品一区二区三区四区| 蜜桃久久av| 国产真实久久|