PIString/PIChar explicit, support char16_t

This commit is contained in:
2023-07-06 19:59:26 +03:00
parent 8ad2503c5a
commit 61f1a34c14
11 changed files with 132 additions and 73 deletions

View File

@@ -30,7 +30,7 @@ void usage() {
piCout << Cyan << "Version" << Bold << PIPVersion() << NewLine;
piCout << Green << Bold << "Usage:" << Default
<< "\"picrypt [-thr] [-g <pass>] [-o <out_file>] [{[-c <file>] [-d <file>]} {[-p <pass>] [-s <hash>] [-k <key_file>] [-x "
"<hex_key>]}]\""
"<hex_key>]}]\""
<< NewLine;
piCout << Green << Bold << "Details:";
piCout << "-h --help " << Green << "- display this message and exit";
@@ -96,7 +96,7 @@ int main(int argc, char * argv[]) {
}
if (cli.hasArgument("pass")) secret = crypt.hash(cli.argumentValue("pass"));
if (cli.hasArgument("secret")) secret = PIByteArray::fromBase64(cli.argumentValue("secret").toByteArray());
if (cli.hasArgument("hex")) secret = PIByteArray::fromHex(cli.argumentValue("hex").toByteArray());
if (cli.hasArgument("hex")) secret = PIByteArray::fromHex(PIString::fromAscii(cli.argumentValue("hex").toByteArray()));
if (secret.size() == crypt.sizeKey()) {
PIFile inf;
PIString in_file;