Enigma 3.2.2
A Simple, Reliable and Efficient Encryption Tool
Loading...
Searching...
No Matches
PasswordGeneratorTool.hpp
Go to the documentation of this file.
1#pragma once
2#include "Tool.hpp"
3#include <Core/Core.hpp>
4#include <imgui.h>
5
6/*
7* Password Generator Tool Collapsing Header View To be drawn in ToolsScene
8*/
11 public:
13 ~PasswordGeneratorTool() override = default;
14
15 public: /* Tool Life Cycle */
16 void OnCreate() override;
17 void OnDraw(Scene *parent) override;
18 void OnDestroy() override;
19
20 public: /* Callbacks */
24
25
26 private: // Password settings
27 bool m_digits{}, m_uppercase_alphabets{}, m_lowercase_alphabets{}, m_special_characters{};
28
29 std::string m_length{"16"};
30 std::string m_password{}; // generated password container
31 std::string m_remember_password_sentence{}; // a helpful sentence to remember ur password based on password characters
32 inline static const std::unordered_map<char, std::string_view> m_remember_password_char_words // letter, word dictionary
33 {
34 {'a', "apple"},
35 {'b', "banana"},
36 {'c', "cat"},
37 {'d', "dog"},
38 {'e', "elephant"},
39 {'f', "frog"},
40 {'g', "grape"},
41 {'h', "hat"},
42 {'i', "ice"},
43 {'j', "juice"},
44 {'k', "kite"},
45 {'l', "lion"},
46 {'m', "moon"},
47 {'n', "nest"},
48 {'o', "orange"},
49 {'p', "pizza"},
50 {'q', "queen"},
51 {'r', "rain"},
52 {'s', "sun"},
53 {'t', "tree"},
54 {'u', "umbrella"},
55 {'v', "violin"},
56 {'w', "whale"},
57 {'x', "x-ray"},
58 {'y', "yogurt"},
59 {'z', "zebra"},
60
61 {'A', "Apple"},
62 {'B', "Banana"},
63 {'C', "Cat"},
64 {'D', "Dog"},
65 {'E', "Elephant"},
66 {'F', "Frog"},
67 {'G', "Grape"},
68 {'H', "Hat"},
69 {'I', "Ice"},
70 {'J', "Juice"},
71 {'K', "Kite"},
72 {'L', "Lion"},
73 {'M', "Moon"},
74 {'N', "Nest"},
75 {'O', "Orange"},
76 {'P', "Pizza"},
77 {'Q', "Queen"},
78 {'R', "Rain"},
79 {'S', "Sun"},
80 {'T', "Tree"},
81 {'U', "Umbrella"},
82 {'V', "Violin"},
83 {'W', "Whale"},
84 {'X', "X-ray"},
85 {'Y', "Yogurt"},
86 {'Z', "Zebra"},
87 };
88};
#define NS_ENIGMA_BEGIN
Enable/Disable Assertions.
Definition Macros.hpp:13
#define NS_ENIGMA_END
Definition Macros.hpp:14
void OnCreate() override
~PasswordGeneratorTool() override=default
void OnDraw(Scene *parent) override
void OnCopyPasswordButtonPressed()
PasswordGeneratorTool()=default
void OnCopyRememberPasswordSentenceButtonPressed()
void OnDestroy() override
Definition Tool.hpp:10