The problem is that I want to get the original values of B, or the original value of C or A. Here is the code:
Dim strA As String = "A"
Dim strB As String = "B"
Dim strC As String = "C"
Dim result As Byte = 0
' Fetch the byte character code of strings and Xor them all into the result in a sequence.
result = result Xor AscW(strA)
result = result Xor AscW(strB)
result = result Xor AscW(strC)
' the final result value is 64
How to do this? Please help m开发者_如何学Ce with the correct solution to this problem. If there can be another parameter which when applied with a formula may reveal the original values: "A", "B", "C". Thank you.
If I understand your question correctly, this is simply not possible. There are multiple ways to split result
back into strA
, strB
and strC
.
To make it easier to see why, consider addition instead. Suppose you start with A = 5, B = 6 and C = 7. The sum is 18. Now suppose you start with A = 1, B = 1 and C = 16. The sum is still 18. Bottom line: if all you have is "18" there's no way to split it back, because multiple inputs give the same output.
精彩评论