diff --git a/ent/encryption/encryption.cc b/ent/encryption/encryption.cc index 1b9475faf0..ca193a9dbe 100644 --- a/ent/encryption/encryption.cc +++ b/ent/encryption/encryption.cc @@ -165,7 +165,7 @@ bytes hmac_sha256(bytes_view msg, bytes_view key) { return res; } -future> read_text_file_fully(const sstring& filename) { +future> read_text_file_fully(const std::string& filename) { return open_file_dma(filename, open_flags::ro).then([](file f) { return f.size().then([f](size_t s) { return do_with(make_file_input_stream(f), [s](input_stream& in) { @@ -179,7 +179,7 @@ future> read_text_file_fully(const sstring& filename) { }); } -future<> write_text_file_fully(const sstring& filename, temporary_buffer buf) { +future<> write_text_file_fully(const std::string& filename, temporary_buffer buf) { return open_file_dma(filename, open_flags::wo|open_flags::create).then([buf = std::move(buf)](file f) mutable { return make_file_output_stream(f).then([buf = std::move(buf)] (output_stream out) mutable { return do_with(std::move(out), [buf = std::move(buf)](output_stream& out) mutable { @@ -193,7 +193,7 @@ future<> write_text_file_fully(const sstring& filename, temporary_buffer b }); } -future<> write_text_file_fully(const sstring& filename, const sstring& s) { +future<> write_text_file_fully(const std::string& filename, const std::string& s) { return write_text_file_fully(filename, temporary_buffer(s.data(), s.size())); } diff --git a/ent/encryption/encryption.hh b/ent/encryption/encryption.hh index b95b3aa9ac..6b0c5ad0d7 100644 --- a/ent/encryption/encryption.hh +++ b/ent/encryption/encryption.hh @@ -63,9 +63,9 @@ bytes calculate_sha256(const bytes&, size_t off = 0, size_t n = bytes::npos); bytes calculate_sha256(bytes_view); bytes hmac_sha256(bytes_view msg, bytes_view key); -future> read_text_file_fully(const sstring&); -future<> write_text_file_fully(const sstring&, temporary_buffer); -future<> write_text_file_fully(const sstring&, const sstring&); +future> read_text_file_fully(const std::string&); +future<> write_text_file_fully(const std::string&, temporary_buffer); +future<> write_text_file_fully(const std::string&, const std::string&); std::optional parse_expiry(std::optional);