Reputation: 2688
i want to crypt some informations with bitwise operations.
For example two numbers with bitwise or: 8 and 1 to 9.
But how can i encrypt it it to get my root nombers?
greetz
Upvotes: 1
Views: 1660
Reputation: 12524
From all bitwise operations only XOR is reversible. Look for XOR-cipher, the easiest way to encrypt your data. In your case you still have to know at least one number from both to restore the second one! There is no way that you can restore both.
Upvotes: 2
Reputation: 41757
You can use a bitwise xor to achieve this, it's known as a xor cipher.
Upvotes: 2