updated to the new pikotools api: changed utf8 functions PascalCase to snake_case
This commit is contained in:
parent
399a645a81
commit
deb8c31951
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2012, Tomasz Sowa
|
||||
* Copyright (c) 2012-2021, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -36,10 +36,6 @@
|
|||
*/
|
||||
|
||||
#include "crypto.h"
|
||||
|
||||
// !! FIX ME
|
||||
//#include "log.h"
|
||||
|
||||
#include "utf8/utf8.h"
|
||||
#include "misc.h"
|
||||
|
||||
|
@ -109,7 +105,7 @@ return true;
|
|||
|
||||
void Crypto::Crypt(const std::wstring & in, std::wstring & out)
|
||||
{
|
||||
PT::WideToUTF8(in, utf8_str);
|
||||
pt::wide_to_utf8(in, utf8_str);
|
||||
|
||||
if( utf8_str.empty() )
|
||||
aes.Encode(&dummy_char, 0, aes_name, uint8_tab);
|
||||
|
@ -172,7 +168,7 @@ bool Crypto::Decrypt(const std::wstring & in, std::wstring & out)
|
|||
if( aes.Decode((const unsigned char *)aes_str.c_str(), aes_str.size(), aes_tmp_name, uint8_tab) )
|
||||
{
|
||||
if( !uint8_tab.empty() )
|
||||
PT::UTF8ToWide((const char*)&uint8_tab[0], uint8_tab.size(), out);
|
||||
pt::utf8_to_wide((const char*)&uint8_tab[0], uint8_tab.size(), out);
|
||||
|
||||
Clear();
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue