Skip to content

Commit d278e5d

Browse files
committed
fixup! crypto: add TurboSHAKE and KangarooTwelve Web Cryptography algorithms
1 parent cded65c commit d278e5d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/crypto/crypto_turboshake.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ using v8::Value;
2626
namespace {
2727

2828
inline uint64_t ROL64(uint64_t val, int offset) {
29+
DCHECK(offset >= 0 && offset < 64);
2930
if (offset == 0) return val;
3031
return (val << offset) | (val >> (64 - offset));
3132
}
@@ -419,6 +420,7 @@ TurboShakeConfig& TurboShakeConfig::operator=(
419420

420421
void TurboShakeConfig::MemoryInfo(MemoryTracker* tracker) const {
421422
if (job_mode == kCryptoJobAsync) {
423+
// TODO(addaleax): Implement MemoryRetainer protocol for ByteSource
422424
tracker->TrackFieldWithSize("data", data.size());
423425
}
424426
}
@@ -525,6 +527,7 @@ KangarooTwelveConfig& KangarooTwelveConfig::operator=(
525527

526528
void KangarooTwelveConfig::MemoryInfo(MemoryTracker* tracker) const {
527529
if (job_mode == kCryptoJobAsync) {
530+
// TODO(addaleax): Implement MemoryRetainer protocol for ByteSource
528531
tracker->TrackFieldWithSize("data", data.size());
529532
tracker->TrackFieldWithSize("customization", customization.size());
530533
}

0 commit comments

Comments
 (0)