mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-15 12:23:15 +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
|
@ -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…
Reference in a new issue