1
0
mirror of https://github.com/winscp/winscp.git synced 2026-10-24 02:28:55 +03:00
Files
winscp/source/core/Security.h
Martin Prikryl 9887ac9205 Optimization
(cherry picked from commit 4cc8444688)

Source commit: 2b785517022dfc6533bfa859f0d374a02ef36bf4
2021-11-26 14:23:12 +01:00

17 lines
961 B
C

//---------------------------------------------------------------------------
#ifndef SecurityH
#define SecurityH
//---------------------------------------------------------------------------
#define PWALG_SIMPLE 1
#define PWALG_SIMPLE_MAGIC 0xA3
#define PWALG_SIMPLE_MAXLEN 50
#define PWALG_SIMPLE_FLAG 0xFF
RawByteString EncryptPassword(UnicodeString Password, UnicodeString Key, Integer Algorithm = PWALG_SIMPLE);
UnicodeString DecryptPassword(RawByteString Password, UnicodeString Key, Integer Algorithm = PWALG_SIMPLE);
RawByteString SetExternalEncryptedPassword(RawByteString Password);
bool GetExternalEncryptedPassword(RawByteString Encrypted, RawByteString & Password);
//---------------------------------------------------------------------------
bool WindowsValidateCertificate(const unsigned char * Certificate, size_t Len, UnicodeString & Error);
//---------------------------------------------------------------------------
#endif