if (!fileInput || !fileAes)
{
}
const char pw[] = { 's', 'p', 'e', 'a', 'k', ',', ' ', 'f', 'r', 'i', 'e', 'n', 'd', ',', ' ', 'a', 'n', 'd', ' ', 'e', 'n', 't', 'e', 'r' };
const Int32 keylen =
sizeof(pw) * 8;
DebugAssert((keylen == 128) || (keylen == 192) || (keylen == 256));
const Int32 blocksize = 256;
{
}
const Int fileSize = fileInput->GetLength();
const Int readBytes = fileInput->TryReadBytes(
buffer, fileSize);
if (readBytes != fileSize)
{
}
if (!fileAes->WriteBytes(
buffer, fileSize))
{
}
fileAes->Close();
fileInput->Close();
{
}
else
{
return maxon::UnexpectedError(
MAXON_SOURCE_LOCATION,
"Error: The encrypted file does not match the encrypted version."_s);
}
const char ** buffer
Definition: abstract.h:327
maxon::Url MaxonConvert(const Filename &fn, MAXONCONVERTMODE convertMode)
@ NONE
No check if file exists under case-sensitive drives.
static Bool CheckEncryption(const Filename &encrypt, const Filename &decrypt, const char *key, Int32 keylen, Int32 blocksize)
Definition: ge_autoptr.h:37
Manages file and path names.
Definition: c4d_file.h:94
void SetSuffix(const maxon::String &str)
Bool FileSelect(FILESELECTTYPE type, FILESELECT flags, const maxon::String &title, const maxon::String &force_suffix=maxon::String())
#define NewMemClear(T, cnt)
Definition: defaultallocator.h:204
maxon::Char Char
Definition: ge_sys_math.h:56
maxon::Int32 Int32
Definition: ge_sys_math.h:60
maxon::Int Int
Definition: ge_sys_math.h:64
@ V_INTEL
Intel, little endian.
return OK
Definition: apibase.h:2667
@ ANY
Show an error dialog for any error.
@ READ
Open the file for reading.
#define MACCREATOR_CINEMA
Standard Mac creator code for Cinema 4D.
Definition: ge_prepass.h:31
#define MACTYPE_CINEMA
Standard Mac type code for Cinema 4D.
Definition: ge_prepass.h:30
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:67
#define ApplicationOutput(formatString,...)
Definition: debugdiagnostics.h:210
#define DebugAssert(condition,...)
Definition: debugdiagnostics.h:248
#define iferr_return
Definition: resultbase.h:1465