OnixS C++ FIX Engine 4.13.0
API Documentation
Loading...
Searching...
No Matches
SecureString.h
Go to the documentation of this file.
1#pragma once
2/*
3* Copyright Onix Solutions Limited [OnixS]. All rights reserved.
4*
5* This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
6* and international copyright treaties.
7*
8* Access to and use of the software is governed by the terms of the applicable OnixS Software
9* Services Agreement (the Agreement) and Customer end user license agreements granting
10* a non-assignable, non-transferable and non-exclusive license to use the software
11* for it's own data processing purposes under the terms defined in the Agreement.
12*
13* Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
14* of this source code or associated reference material to any other location for further reproduction
15* or redistribution, and any amendments to this copyright notice, are expressly prohibited.
16*
17* Any reproduction or redistribution for sale or hiring of the Software not in accordance with
18* the terms of the Agreement is a violation of copyright law.
19*/
20
21#include <OnixS/FIXEngine/ABI.h>
22
24
25namespace OnixS {
26namespace Cryptography {
27
30{
31public:
34
38 explicit SecureString(FIX::StringRef plainText);
39
44 SecureString(const char * plainText, size_t plainTextLength);
45
47 SecureString(const SecureString & other);
48
51
54
56 size_t length() const;
57
59 bool empty() const;
60
61protected:
62 class Impl;
63 SecureString(const Impl *);
64
65private:
66 const Impl * impl_;
67};
68
71{
72public:
75
80
85 SecureStringBuilder(const char * plainText, size_t plainTextLength);
86
89
92
94
96 size_t length() const;
97
102
106 void assign(FIX::StringRef plainText);
107
112 void assign(const char * plainText, size_t plainTextLength);
113
115 void append(char c);
116
118 void insert(size_t index, char c);
119
121 void replace(size_t index, char c);
122
124 void erase(size_t index);
125
127 void clear();
128
129protected:
130 class Impl;
131
132private:
133 Impl * impl_;
134};
135
136
137}
138}
#define ONIXS_FIXENGINE_API
Definition ABI.h:45
void assign(const char *plainText, size_t plainTextLength)
Replaces internal value with a new one.
void erase(size_t index)
Removes the character at the specified index position from this secure string.
SecureStringBuilder(const char *plainText, size_t plainTextLength)
Constructs the SecureStringBuilder which stores the encrypted plainText as an initial value.
SecureStringBuilder(FIX::StringRef plainText)
Constructs the SecureStringBuilder which stores the encrypted plainText as an initial value.
void insert(size_t index, char c)
Inserts a character in this secure string at the specified index position.
void assign(FIX::StringRef plainText)
Replaces the secure value with a new one.
void replace(size_t index, char c)
Replaces the existing character at the specified index position with another character.
size_t length() const
Gets the number of characters in the current secure string.
void append(char c)
Appends a character to the end of the current secure string.
SecureStringBuilder(const SecureStringBuilder &other)
Initializes the instance as a deep copy of other one.
void clear()
Deletes the value of the current secure string.
SecureString detach()
Moves the encoded data to the immutable SecureString object.
SecureStringBuilder & operator=(const SecureStringBuilder &other)
Makes a deep copy of another SecureStringBuilder.
SecureStringBuilder()
Constructs the empty SecureStringBuilder.
The immutable secure string.
SecureString(const SecureString &other)
Initializes the instance as a shallow copy of other one.
SecureString(FIX::StringRef plainText)
Constructs the SecureString which stores the encrypted plainText.
SecureString()
Constructs the empty SecureString.
bool empty() const
Indicates whether the SecureString has no data.
size_t length() const
The length of the plain string.
SecureString & operator=(const SecureString &other)
Makes a shallow copy of another SecureString.
~SecureString()
Disposes all internal data structures.
SecureString(const char *plainText, size_t plainTextLength)
Constructs the SecureString which stores the encrypted plainText.
Provides an efficient way of accessing text-based FIX field values.
Definition StringRef.h:62