Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void enc_dec(char *input, char *output) {
- char key1 ="Rtj@";
- char output1[100];
- int i=0,j=0;
- for(i = 0; i < strlen(input); i++) {
- output1[i] = (input[i] ^ key1);
- }
- }
- def compute(self):
- k1 = self.key1.get()
- msg = self.message.get()
- output = []
- for i in range(len(msg)):
- xor_num = ord(msg[i]) ^ ord(k1[i % len(k1)])
- output.append(chr(xor_num))
- return ''.join(output)
- xor_num = ord(msg[i]) ^ ord(k1)
- xor_num = ord(msg[i]) ^ ord(k1[i])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement