xtd 0.2.0
Loading...
Searching...
No Matches
secure_string.h
Go to the documentation of this file.
1
4#pragma once
5#include "../string.h"
6#include <vector>
7
9namespace xtd {
11 namespace security {
22 class secure_string final : public xtd::object {
23 public:
25
28 secure_string() = default;
29
34 secure_string(const char value[], size_t length);
36
38 secure_string(secure_string&&) = default;
39 secure_string(const secure_string&) = default;
40 secure_string& operator =(const secure_string&) = default;
41 bool empty() const noexcept;
43
45
49 intptr data() const noexcept;
50
53 size_t size() const noexcept;
55
57
62 std::string to_unsecure_string() const noexcept;
64
65 private:
66 std::vector<xtd::byte> data_;
67 };
68 }
69}
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:42
Represents text that should be kept confidential, such as by deleting it from computer memory when no...
Definition secure_string.h:22
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 size.h:23
intmax_t intptr
Represent a pointer or a handle.
Definition intptr.h:23
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10