now winix is using 'pikotools' (confparser, utf8, mainparser)

git-svn-id: svn://ttmath.org/publicrep/winix/trunk@792 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2012-01-12 02:24:08 +00:00
parent cb33f20a24
commit b2d3ca9543
55 changed files with 1749 additions and 1884 deletions

View File

@@ -2,14 +2,14 @@
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2011, Tomasz Sowa
* Copyright (c) 2011-2012, Tomasz Sowa
* All rights reserved.
*
*/
#include <cstring>
#include "crypt.h"
#include "utf8.h"
#include "utf8/utf8.h"
#include "misc.h"
#include "log.h"
@@ -44,7 +44,7 @@ bool Crypt::Hash(int hash, const char * in, size_t inlen, std::string & out)
return false;
run.Clear();
Ezc::WideToUTF8(config->opensll_path, command);
PT::WideToUTF8(config->opensll_path, command);
run.Cmd(command);
run.Par("dgst");
@@ -87,7 +87,7 @@ bool Crypt::Hash(int hash, const std::string & in, std::string & out)
bool Crypt::Hash(int hash, const wchar_t * in, size_t inlen, std::wstring & out)
{
Ezc::WideToUTF8(in, inlen, bufina);
PT::WideToUTF8(in, inlen, bufina);
int res = Hash(hash, bufina.c_str(), bufina.size(), bufouta);
// the output hash is not a UTF8 string
@@ -132,7 +132,7 @@ bool Crypt::RSA(bool encrypt, const char * keypath, const char * in, size_t inle
return false;
run.Clear();
Ezc::WideToUTF8(config->opensll_path, command);
PT::WideToUTF8(config->opensll_path, command);
run.Cmd(command);
run.Par("rsautl");
@@ -164,7 +164,7 @@ bool Crypt::RSA(bool encrypt, const std::string & keypath, const std::string & i
bool Crypt::RSA(bool encrypt, const wchar_t * keypath, const char * in, size_t inlen, std::string & out)
{
Ezc::WideToUTF8(keypath, keypatha);
PT::WideToUTF8(keypath, keypatha);
return RSA(encrypt, keypatha.c_str(), in, inlen, out);
}
@@ -229,7 +229,7 @@ bool Crypt::PassCrypt(const std::wstring & path_to_rsa_private_key, UserPass & u
if( !path_to_rsa_private_key.empty() )
{
Ezc::WideToUTF8(up.pass, passa);
PT::WideToUTF8(up.pass, passa);
if( RSA(true, path_to_rsa_private_key, passa, up.pass_encrypted) )
{