@@ -14,10 +14,10 @@ class HashWorker final : public Napi::AsyncWorker {
14
14
uint32_t memory_cost, uint32_t time_cost, uint32_t parallelism,
15
15
uint32_t version, uint32_t type)
16
16
: AsyncWorker{env, " argon2:HashWorker" }, deferred{env},
17
- plain{plain.Data (), plain.ByteLength ()},
18
- salt{salt.Data (), salt.ByteLength ()},
19
- secret{secret.Data (), secret.ByteLength ()},
20
- ad{ad.Data (), ad.ByteLength ()}, hash_length{hash_length},
17
+ plain{plain.Data (), plain.Data () + plain. ByteLength ()},
18
+ salt{salt.Data (), salt.Data () + salt. ByteLength ()},
19
+ secret{secret.Data (), secret.Data () + secret. ByteLength ()},
20
+ ad{ad.Data (), ad.Data () + ad. ByteLength ()}, hash_length{hash_length},
21
21
memory_cost{memory_cost}, time_cost{time_cost},
22
22
parallelism{parallelism}, version{version},
23
23
type{static_cast <argon2_type>(type)} {}
@@ -65,7 +65,7 @@ class HashWorker final : public Napi::AsyncWorker {
65
65
}
66
66
67
67
private:
68
- using ustring = std::basic_string <uint8_t >;
68
+ using ustring = std::vector <uint8_t >;
69
69
70
70
Napi::Promise::Deferred deferred;
71
71
ustring hash = {};
0 commit comments