Online
Registriert seit: 24. Okt 2006
Ort: Seifhennersdorf / Sachsen
5.426 Beiträge
Delphi 12 Athens
|
AW: Verschlüsselung: Unterschied von const und var ???
5. Okt 2017, 10:47
Moin... 
Dankeschön für deine Anteilnahme.
Ich hatte im Original noch einen Fehler drin.
Original:
Delphi-Quellcode:
// Decode
aPass := ValidHash(aHashClass).KDFx(conKey, Length(conKey) * SizeOf(conKey[1]), aSalt[1], Length(aSalt), Cipher.Context.KeySize, TFormat_Copy, aKDFIndex); // [1] fehlt!
// Encode
aPass := ValidHash(aHashClass).KDFx(conKey[1], Length(conKey) * SizeOf(conKey[1]), aSalt[1], Length(aSalt), Cipher.Context.KeySize, TFormat_Copy, aKDFIndex);
Funktionierend:
Delphi-Quellcode:
// Decode
aPass := ValidHash(HashClass).KDFx(aKey[1], Length(aKey) * 2, Salt[1], Length(Salt), Cipher.Context.KeySize, TFormat_Copy, KDFIndex); // - SizeOf(Key)
// Encode
aPass := ValidHash(HashClass).KDFx(aKey[1], Length(aKey) * 2, Salt[1], Length(Salt), Cipher.Context.KeySize, TFormat_Copy, KDFIndex); // - SizeOf(Key)
Vieleicht hat das den Unterschied gemacht...
Zitat:
Du rufst ValidHash falsch auf.
...meinst du das [1] ?
|
|
Zitat
|