Einzelnen Beitrag anzeigen

Benutzerbild von haentschman
haentschman

Registriert seit: 24. Okt 2006
Ort: Seifhennersdorf / Sachsen
5.297 Beiträge
 
Delphi 12 Athens
 
#4

AW: Verschlüsselung: Unterschied von const und var ???

  Alt 5. Okt 2017, 09: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] ?
  Mit Zitat antworten Zitat