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 <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
  • Loading branch information
tniessen authored and targos committed Jul 18, 2022
1 parent 6bdd0f5 commit f14c750
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 @@ -752,20 +752,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 f14c750

Please sign in to comment.