4#include <system/object.h>
5#include <system/idisposable.h>
6#include <system/string.h>
7#include <system/details/spin_lock.h>
11namespace System {
namespace Runtime {
namespace InteropServices {
class Marshal; }}}
13namespace System {
namespace Security {
36 ASPOSECPP_SHARED_API
SecureString(
const char16_t* value, int32_t length);
52 ASPOSECPP_SHARED_API
void Clear();
60 ASPOSECPP_SHARED_API
void InsertAt(int32_t index,
char16_t c);
70 ASPOSECPP_SHARED_API
void RemoveAt(int32_t index);
75 ASPOSECPP_SHARED_API
void SetAt(int32_t index,
char16_t c);
78 ASPOSECPP_SHARED_API
void Dispose()
override;
86 std::unique_ptr<Impl> m_impl;
88 using Lockable = Details::SpinLock;
89 using LockGuard = std::lock_guard<Lockable>;
92 mutable Lockable m_lockable;
95 void VerifyWriteable()
const;
97 void VerifyNotDisposed()
const;
99 void VerifyEnoughSpace()
const;
104 IntPtr MarshalToString(
bool global_alloc,
bool unicode);
Defines method that releases resources owned by the current object. Objects of this class should only...
Definition: idisposable.h:30
Provides marshalling implementation. For compatibility with translated code only, as no managed code ...
Definition: marshal.h:19
Secure string, represents text that should be kept confidential. This class DON'T ENCRYPTING the inte...
Definition: secure_string.h:25
void Dispose() override
Release all resources used by the current object.
String ToUnsecureString() const
Copies contents of this secure string into unsecure String object. Use with caution.
void InsertAt(int32_t index, char16_t c)
Inserts a character at the specified index.
void MakeReadOnly()
Makes this secure string read-only.
SecureString & operator=(const SecureString &)=delete
void RemoveAt(int32_t index)
Removes the character at the specified position.
SecureStringPtr Copy() const
Creates a duplicate of this secure string.
void Clear()
Delete all characters from the current secure string.
SecureString(const SecureString &)=delete
~SecureString()
Destructor.
SecureString()
RTTI information.
bool IsReadOnly() const
Gets flag that indicates whether this object is marked read-only.
int32_t get_Length() const
Gets number of characters in this secure string.
void SetAt(int32_t index, char16_t c)
Replaces the existing character at the specified position.
void AppendChar(char16_t c)
Appends a character to the end of the string.
SecureString(const char16_t *value, int32_t length)
Constructor.
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
SharedPtr< SecureString > SecureStringPtr
SecureString pointer type.
Definition: secure_string.h:17
Definition: db_command.h:9