(string,power,n,bits=128)
| 163 | return ''.join(lst) # the length of this must be a multiple of bytes |
| 164 | |
| 165 | def decrypt(string,power,n,bits=128): |
| 166 | bytes=bits//8 |
| 167 | lst=[] |
| 168 | while string: |
| 169 | lst.append(string[:bytes]) |
| 170 | string=string[bytes:] |
| 171 | for i in range(len(lst)): |
| 172 | lst[i]=crypt(lst[i],power,n) |
| 173 | ret=''.join(lst) |
| 174 | ret=ret.replace("/0",'\0').replace("/s",'/') |
| 175 | return ret |
| 176 | |
| 177 | # data=data.replace('/',"/s").replace('\0',"/0") |
| 178 | # data=data.replace("/0",'\0').replace("/s",'/') |