mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:37:46 +00:00
LibCrypto: Don't return reference to stack frame in PBKDF
A reference to the current stack frame becomes invalid after returning, so returning Bytes is pointless. I don't understand why this wasn't discovered earlier, but it caused some CI problems for me, so I fixed it. Don't take this as encouragement to break master! :^)
This commit is contained in:
parent
522809032a
commit
968f2b3eeb
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ namespace Crypto::Hash {
|
|||
class PBKDF2 {
|
||||
public:
|
||||
template<typename PRF>
|
||||
static ErrorOr<Bytes> derive_key(ReadonlyBytes password, ReadonlyBytes salt, u32 iterations, u32 key_length_bytes)
|
||||
static ErrorOr<ByteBuffer> derive_key(ReadonlyBytes password, ReadonlyBytes salt, u32 iterations, u32 key_length_bytes)
|
||||
requires requires(PRF t) {
|
||||
t.digest_size();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue