src: remove KeyObjectData::CreateSecret overload

This function is unused and there is not much potential for using
it in the current codebase.

PR-URL: https://github.com/nodejs/node/pull/38067
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
Tobias Nießen
2021-04-04 02:14:55 +02:00
committed by Rich Trott
parent f52c92134c
commit 66c8f76c2c
2 changed files with 0 additions and 8 deletions

View File

@@ -837,11 +837,6 @@ void KeyObjectData::MemoryInfo(MemoryTracker* tracker) const {
}
}
std::shared_ptr<KeyObjectData> KeyObjectData::CreateSecret(
const ArrayBufferOrViewContents<char>& buf) {
return CreateSecret(buf.ToCopy());
}
std::shared_ptr<KeyObjectData> KeyObjectData::CreateSecret(ByteSource key) {
CHECK(key);
return std::shared_ptr<KeyObjectData>(new KeyObjectData(std::move(key)));

View File

@@ -134,9 +134,6 @@ class ManagedEVPPKey : public MemoryRetainer {
// Objects of this class can safely be shared among threads.
class KeyObjectData : public MemoryRetainer {
public:
static std::shared_ptr<KeyObjectData> CreateSecret(
const ArrayBufferOrViewContents<char>& buf);
static std::shared_ptr<KeyObjectData> CreateSecret(ByteSource key);
static std::shared_ptr<KeyObjectData> CreateAsymmetric(