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
Notes:
sideshowbarker
2024-07-16 23:44:30 +09:00
Author: https://github.com/BenWiederhake Commit: https://github.com/SerenityOS/serenity/commit/968f2b3eeb Pull-request: https://github.com/SerenityOS/serenity/pull/19211 Reviewed-by: https://github.com/gmta
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
Reference in a new issue