Skip to content

Commit

Permalink
src: remove CopyBuffer
Browse files Browse the repository at this point in the history
CopyBuffer was used by the PBKDF2 implementation prior to the big
refactor, which removed those call sites.

PR-URL: #43463
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
  • Loading branch information
tniessen authored Jun 20, 2022
1 parent b574532 commit 20ef270
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/crypto/crypto_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -777,20 +777,6 @@ class ArrayBufferOrViewContents {
std::shared_ptr<v8::BackingStore> store_;
};

template <typename T>
std::vector<T> CopyBuffer(const ArrayBufferOrViewContents<T>& buf) {
std::vector<T> vec;
vec->resize(buf.size());
if (vec->size() > 0 && buf.data() != nullptr)
memcpy(vec->data(), buf.data(), vec->size());
return vec;
}

template <typename T>
std::vector<T> CopyBuffer(v8::Local<v8::Value> buf) {
return CopyBuffer(ArrayBufferOrViewContents<T>(buf));
}

v8::MaybeLocal<v8::Value> EncodeBignum(
Environment* env,
const BIGNUM* bn,
Expand Down

0 comments on commit 20ef270

Please sign in to comment.