mk-pass
Generate a password comprehensively
Loading...
Searching...
No Matches
mk_pass.hpp
Go to the documentation of this file.
1#ifndef MK_PASS_H_
2#define MK_PASS_H_
3
4/* Generated with cbindgen:0.29.2 */
5
6#include <stdint.h>
7
8namespace mk_pass {
9
13 uint16_t length;
15 uint16_t decimal;
17 uint16_t specials;
22
23 bool operator==(const PasswordRequirements &other) const {
24 return length == other.length && decimal == other.decimal
25 && specials == other.specials
27 && allowRepeats == other.allowRepeats;
28 }
29 bool operator!=(const PasswordRequirements &other) const {
30 return length != other.length || decimal != other.decimal
31 || specials != other.specials
33 || allowRepeats != other.allowRepeats;
34 }
35};
36
37extern "C" {
38
43uint16_t generatePassword(char* string, PasswordRequirements config);
44
46void runMain();
47
99
100} // extern "C"
101
102} // namespace mk_pass
103
104#endif // MK_PASS_H_
Definition mk_pass.hpp:8
void runMain()
The function used as a native entrypoint for an executable.
PasswordRequirements validateRequirements(const PasswordRequirements *config)
uint16_t generatePassword(char *string, PasswordRequirements config)
A structure to describe the requirements of a password's contents.
Definition mk_pass.hpp:11
uint16_t decimal
How many decimal integer characters should the password contain?
Definition mk_pass.hpp:15
bool firstIsLetter
Should the first character always be a letter?
Definition mk_pass.hpp:19
bool operator!=(const PasswordRequirements &other) const
Definition mk_pass.hpp:29
bool operator==(const PasswordRequirements &other) const
Definition mk_pass.hpp:23
uint16_t specials
How many special characters should the password contain?
Definition mk_pass.hpp:17
uint16_t length
The length of the password.
Definition mk_pass.hpp:13
bool allowRepeats
Allow characters to be used more than once?
Definition mk_pass.hpp:21