G
greenwon
Unregistered / Unconfirmed
GUEST, unregistred user!
有如下的PB函数:of_decrypt (string as_strtodecrypt) returns string return of_decrypt(as_strtodecrypt,idbl_decrypter,idbl_modulus)of_decrypt (string as_strtodecrypt,double adbl_d,double adbl_n) returns string string ls_decryptedlong ll_templong ll_lenll_len = len(string(adbl_n))do until as_strtodecrypt = "" ll_temp = long(left(as_strtodecrypt,ll_len)) as_strtodecrypt = mid(as_strtodecrypt,ll_len + 1) ll_temp = of_mult(ll_temp,adbl_d,adbl_n) ls_decrypted = ls_decrypted + char(ll_temp)loopreturn ls_decryptedof_encrypt (string as_strtoencrypt) returns string return of_encrypt(as_strtoencrypt,idbl_encrypter,idbl_modulus)of_encrypt (string as_strtoencrypt,double adbl_e,double adbl_n) returns string string ls_encrypted = ""long ll_tempdo until len(as_strtoencrypt) = 0 ll_temp = asc(left(as_strtoencrypt,1)) as_strtoencrypt = mid(as_strtoencrypt,2) ll_temp = of_mult(ll_temp,adbl_e,adbl_n) ls_encrypted = ls_encrypted + string(ll_temp,fill("0",len(string(adbl_n))))loopreturn ls_encryptedof_mult (double adbl_x,double adbl_p,double adbl_m) returns double double ldbl_y = 1do while adbl_p > 0 do while adbl_p / 2 = long(adbl_p / 2) adbl_x = mod(adbl_x * adbl_x,adbl_m) adbl_p = adbl_p / 2 loop ldbl_y = mod(adbl_x * ldbl_y,adbl_m) adbl_p = adbl_p - 1loopreturn ldbl_y及其变量:protected double idbl_encrypter = 53614307protected double idbl_modulus = 62223781protected double idbl_decrypter = 12234443请问:这是什么样的加密方式?在delphi中又如何实现?谢谢!