xtd 0.2.0
Loading...
Searching...
No Matches
secure_string.h
Go to the documentation of this file.
1
4#pragma once
5#include "../ustring.h"
6#include <vector>
7
9namespace xtd {
11 namespace security {
20 class secure_string final : public xtd::object {
21 public:
23
26 secure_string() = default;
27
32 secure_string(const char value[], size_t length);
34
36 secure_string(secure_string&&) = default;
37 secure_string(const secure_string&) = default;
38 secure_string& operator =(const secure_string&) = default;
39 bool empty() const noexcept;
41
43
47 intptr data() const noexcept;
48
51 size_t size() const noexcept;
53
55
60 std::string to_unsecure_string() const noexcept;
62
63 private:
64 std::vector<xtd::byte> data_;
65 };
66 }
67}
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:32
Represents text that should be kept confidential, such as by deleting it from computer memory when no...
Definition secure_string.h:20
secure_string(const char value[], size_t length)
This API supports the product infrastructure and is not intended to be used directly from your code....
intptr data() const noexcept
Gets underlying encrypted data.
std::string to_unsecure_string() const noexcept
Gets decrypted data.
secure_string()=default
Initializes a new instance of the xtd::security::secure_string class.
size_t size
Represents a size of any object in bytes.
Definition types.h:197
intmax_t intptr
Represent a pointer or a handle.
Definition types.h:153
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10