哪位高手能够将一下两段PB代码翻译成C#语言?

guangpengg 2012-03-15 10:42:38
哪位高手能够将一下两段PB代码翻译成C#语言?
------------解密程序
string ls_s
string ls_asc
string ls_return
string ls_ss
string ls_shiliu
string ls_s1
string ls_jian1
integer li_i
integer li_j



if ((as_s = "") or (isnull(as_s))) then
return "hello"
end if

if as_s = "10A54B51sgdf545g41223g" then
return ""
end if

ls_s1 = as_s

for li_j = 1 to len(as_s)

if pos(ls_s1,"g") = 0 then
exit
else
ls_shiliu = left(ls_s1,pos(ls_s1,"g") - 1)
ls_s1 = right(ls_s1,len(ls_s1) - pos(ls_s1,"g"))

if pos(ls_s1,"g") = 0 then
ls_s = ls_s + gf_changejz2(ls_shiliu)
else
ls_s = ls_s + string(long(gf_changejz2(ls_shiliu)),"000000000")
end if

end if

next

for li_i = 1 to len(ls_s) step 3
ls_jian1 = ls_jian1 + string(long(mid(ls_s,li_i,3)) - 1,"000")
next

ls_asc = ""

for li_i = len(ls_jian1) to 1 step -1
ls_asc = ls_asc + mid(ls_jian1,li_i,1)
next

ls_return = ""

for li_i = 1 to len(ls_asc) step 3
ls_return = ls_return + char(long(mid(ls_asc,li_i,3)) - 1)
next

if ((ls_return = "") or (isnull(ls_return))) then
ls_return = "hello"
end if

atr_sqlca.logid = as_logid
atr_sqlca.logpass = ""
connect using atr_sqlca;

if atr_sqlca.sqlcode <> 0 then
disconnect using atr_sqlca;
return ls_return
else
disconnect using atr_sqlca;
return "hello"
end if






------------加密程序
string ls_asc
string ls_s
string ls_return
string aa[10]
string a[10]
string ls_zaijia1
integer li_i
integer li_j
long ls_sz
long duan
long len



if ((as_pwd = "") or (isnull(as_pwd))) then
return "10A54B51sgdf545g41223g"
end if

ls_asc = ""

for li_i = 1 to len(as_pwd)
ls_asc = ls_asc + string(asc(mid(as_pwd,li_i,1)) + 1,"000")
next

ls_s = ""

for li_i = len(ls_asc) to 1 step -1
ls_s = ls_s + mid(ls_asc,li_i,1)
next

ls_zaijia1 = ""

for li_i = 1 to len(ls_s) step 3
ls_zaijia1 = ls_zaijia1 + string(long(mid(ls_s,li_i,3)) + 1,"000")
next

len = len(ls_zaijia1)

if mod(len,9) > 0 then
duan = len / 9 + 1
else
duan = len / 9
end if

for li_i = 1 to duan
aa[duan] = mid(ls_zaijia1,li_i * 9 - 8,9)
a[duan] = gf_changejz(long(aa[duan]),16) + "g"
ls_return = ls_return + a[duan]
next

return ls_return
...全文
98 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
devmiao 2012-03-16
  • 打赏
  • 举报
回复
貌似不难,照着写一下就可以了。不懂的可以查查手册哦。
EnForGrass 2012-03-16
  • 打赏
  • 举报
回复
这自己翻译
冰镇宝贝321 2012-03-16
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 xihuanbiancheng 的回复:]
我可以 860047732 联系我
[/Quote]


写出来嘛。。。分享分享啦
油锅中的蛤蟆 2012-03-16
  • 打赏
  • 举报
回复
楼上的可以。楼上估计有源码
xihuanbiancheng 2012-03-16
  • 打赏
  • 举报
回复
我可以 860047732 联系我

111,126

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧