Autor Beitrag
uall@ogc
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: So 23.01.05 23:41 
so mein letztes problem für heute
ist es möglich folgendes rückgängig zu machen:

ausblenden Delphi-Quelltext
1:
a1^ := a1^ xor (decryparray[(j+i) and $For (j shl j) or j or $A5);					


al^ ist ein pointer auf nen byte
j kann von 0 bis 3 gehen

decryptarray ist ein festes array mit 16 bytes

mein problem ist schon:

wenn decryparray[(j+i) and $F] or (j shl j) or j -> 5 ist
und dann

egal ob $4 oder $5 or $A5 gemacht wird es kommt beides mal $A5 raus also kann man doch ne or verlnüpfung nicht rückgängig machen wenn man das ergebnis kenn und womit der wert verknüpfu wurde oder?
patrick
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1481

WIN2k, WIN XP
D6 Personal, D2005 PE
BeitragVerfasst: Mo 24.01.05 10:43 
kannst du die ganze funktion posten?
ich würd meine variante gerne ausprobieren, ich hab zwar war, bin mir aber nicht ganz sicher ob das so funktioniert :oops: ...und bevor ich was falsches in die welt schreibe... :nixweiss:

_________________
Patrick
im zweifelsfall immer das richtige tun!!!
MitschL
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 211

Win 98 SE, Win 2000
D5 Pers, D6 Pers und D7 Pro
BeitragVerfasst: Mo 24.01.05 18:26 
Ähm,

wenn mich mein Logikverständnis nicht trügt, müßte doch
decryparray[(j+i) and $F] = decryparray[j+i] sein - immerhin geht's nur um eine Position im Array mit 16 Zeichen, oder?

Ansonsten ist ein or nicht umkehrbar. ( Schau es dir dezimal an, das macht es IMHO sichtbar.)

gegrüßt!

_________________
"Bloßes Ignorieren ist noch keine Toleranz." (Theodor Fontane)
uall@ogc Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Mo 24.01.05 20:11 
problem wurde anders gelöst da

(decryparray[(j+i) and $F] or (j shl j) or j or $A5);

maximal 64 werte haben konnte und die einfach immer wieder von vorne anfangen

decryparray 16 elemente mal j 4 elemente = 64 ;>
ScorpionKing
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 1150

Win XP

BeitragVerfasst: Mo 24.01.05 20:16 
or und xor kann man doch nicht rückgänig machen, oder täusch ich mich da??? :?: :!:

_________________
Aus dem Urlaub zurück!
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Mo 24.01.05 20:18 
xor schon, or nicht

AXMD
uall@ogc Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1826
Erhaltene Danke: 11

Win 2000 & VMware
Delphi 3 Prof, Delphi 7 Prof
BeitragVerfasst: Mo 24.01.05 20:21 
xor geht durch 2 malies xorn
and und or geht nicht


or:
11001110
00110001
________
11111111

and:
11011011
00111111
________
00011011

xor:
10101001
10110101
________
00011100
xor2:
10110101
________
10101001 <- wieder das 1.