3#include <NDEVR/String.h>
34 const char*
begin()
const {
return m_passcode.begin(); }
39 char*
begin() {
return m_passcode.begin(); }
48 void clear() { m_passcode.clear(); }
53 bool isEmpty() {
return m_passcode.isEmpty(); }
124 static UUID s_password_id;
145 static const bool Enum =
false;
bool isEmpty()
Checks whether the encoded password is empty.
const char * begin() const
Returns a const pointer to the beginning of the encoded password data.
static PasswordString RAW(const StringView &value)
Takes the value without doing any encoding or decoding.
String decode() const
Decodes using the system default key which will only be valid for this software session.
bool operator!=(const PasswordString &passcode) const
Checks whether two password strings are not equal.
static PasswordString Encode(const StringView &input, const StringView &key)
Encodes using a specific key, in case passwords should be retrievable across sessions.
void clear()
Clears the encoded password data.
Strength passwordStrength(const StringView &key) const
Evaluates the strength of the decoded password.
static PasswordString FromString(const StringView &value)
Takes the value without doing any encoding or decoding.
Strength
Enumeration representing the strength level of a password.
@ e_moderate
Password has moderate strength.
@ e_very_strong
Password is very strong and highly secure.
@ e_strong
Password is strong and reasonably secure.
@ e_weak
Password is weak and offers minimal security.
@ e_very_weak
Password is very weak and easily guessable.
void swapEncoding(const StringView ¤t_key, const StringView &new_key)
Changes the encoding from one key to another.
bool operator==(const PasswordString &passcode) const
Checks whether two password strings are equal.
String decode(const StringView &key) const
Decodes using a specific key, in case passwords should be retrievable across sessions.
char * begin()
Returns a mutable pointer to the beginning of the encoded password data.
PasswordString()
Creates an empty password string.
static PasswordString Encode(const StringView &input)
Encodes using the session default key which will only be valid for this software session.
uint04 size() const
Returns the size of the encoded password string.
Logic for reading or writing to a string or a user friendly, TranslatedString.
The core String View class for the NDEVR API.
The core String class for the NDEVR API.
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
The primary namespace for the NDEVR SDK.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
static const uint01 Dimensions
Number of dimensions (0 for scalar types).
static const bool Buffer
Whether this type is a buffer.
static const bool Boolean
Whether this type is a boolean.
static const bool Primitive
Whether this type is a primitive.
static constexpr ObjectInfo< char, false, false > VectorSub()
Returns the ObjectInfo for the sub-vector element type.
static const bool Integer
Whether this type is an integer.
static const bool String
Whether this type is a string.
static const bool Enum
Whether this type is an enum.
static const bool Unsigned
Whether this type is unsigned.
static const bool Float
Whether this type is a floating-point number.
static const bool Color
Whether this type is a color.
static const bool Vector
Whether this type is a vector.
static const bool Pointer
Whether this type is a pointer.
static const bool Number
Whether this type is a number.
Information about the object.