Autor Beitrag
Tex
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 21



BeitragVerfasst: Sa 19.01.08 16:49 
Hallo Zusammen,

mal wieder eine kleine Frage:

Ich habe ein Prog geschrieben, das Files mit Hilfe der Componente DCPCrypt ver- und entschlüsselt.
Beides funktioniert bestens, ABER:

Wenn ich eine verschlüsselte Datei entschlüsseln möchte und dabei ein falsches Passwort eingebe, entschlüsselt die Komponente die Datei einfach ohne Fehlermeldung. (dabei kommt natürlich nur sinnloser Zeichensalat raus)
Gib es eine Möglichkeit vor dem entschlüsseln das Passwort auf Korrektheit zu prüfen?


Danke,

Tex

_________________
"Alles was du hast, hat irgendwann dich." Tyler Durden
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: Sa 19.01.08 17:06 
Ja du machst vorher eine MD5 Checksumme auf die unverschlüsselte Datei. Nach dem decrypten schaust du ob diese übereinstimmt -> wenn nicht dann war das ein falsches PW, wenn ja dann war es das richtige.

_________________
wer andern eine grube gräbt hat ein grubengrabgerät
- oder einfach zu viel zeit
Tex Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 21



BeitragVerfasst: Sa 19.01.08 17:11 
Stimmt. Da hät ich auch selbst drauf kommen können.

Danke...

_________________
"Alles was du hast, hat irgendwann dich." Tyler Durden