>>>
Zero-fill right shift Shifts right, but always fills in with 0's.
Zero-fill right shift Shifts right, but always fills in with 0's.
解决方案 »
- 全排列算法解释一下
- 请问一下在JDBC连SQL SEVER2000的时候遇到的一个问题
- 请教几个关键字之间的关系?
- 我的JSP管理系统出现下面问题,请高手指导,谢谢!!!
- 急!!!jar文件在xp下象使用exe文件一样方便,在2000下为何不能使用?
- 有没有谁用java写过bom逻辑错误处理。在线等!
- 一个巨简单的问题 不需要具体答案!有分!
- 哪里有 2003年度Javaworld编辑奖最佳Java书籍的下载,例如Patterns of Enterprise Application Architecture
- 我是java新手,正在学,有些不懂指出,向大家请教
- applet问题,帮忙看看。高分!
- 各位高手还是昨天的事!!!--- 怎样将字符转换为数据?(javascript)
- 疑问
{
int len1,i;
byte tb;
char high,tmp,low;
String result;
len1=len(bySourceByte);
for(i=0;i<len1;i++)
{
tb=bySourceByte[i];
tmp=(char)((tb>>>4)&0x000f);
if(tmp>=10)
high=(char)('a'+tmp-10);
else
high=(char)('0'+tmp);
result+=high;
tmp=(char)(tb&0x000f);
if(tmp>=10)
low=(char)('a'+tmp-10);
else
low=(char)('0'+tmp);
result+=low;
}
return result;
}
#include<iostream>
#include<stdio.h>using namespace std;string bintoascii(char bySourceByte[])
{
int len,i;
char tb;
char high,tmp,low;
len=strlen(bySourceByte);
string result;
for(i=0;i<len;i++) {
tb=(char)bySourceByte[i];
tmp=(char)((tb>>4)&0x000f);
if(tmp>=10) {
high=(char)('a'+tmp-10);
} else {
high=(char)('0'+tmp);
}
result+=high;
tmp=(char)(tb&0x000f);
if(tmp>=10) {
low = (char)('a'+tmp-10);
} else {
low = (char)('0'+tmp);
}
result+=low;
}
return result;
}int
main(int args, char *argv[])
{
if (args < 2) {
cout<<"Usage: md5 string"<<endl;
exit(0);
}
cout<<bintoascii(argv[1])<<endl;
return 0;
}不知道行不行
md5的函数代码可以看看吗?