AuroraRuntime/Source/Crypto/CBC/CBC.hpp
Reece Wilson d63571e4b5 [+] AuCompression::CompressionInterceptor
[+] AuCrypto::CBC::CBCContext
[+] AuFS::ReadDirRecursive
[+] AuFS::DirDeleter
[+] AuCrypto::PBKDF2
[+] AuCrypto::AES::CBCEncrypt
[+] AuCrypto::AES::CBCDecrypt
[+] AuCrypto::TDES::CBCEncrypt
[+] AuCrypto::TDES::CBCDecrypt
[+] Optimize read write locks
[*] Added `ContextFlags = CONTEXT_ALL` to Win32 PlatformWalkCallStack
2022-11-06 13:23:22 +00:00

31 lines
860 B
C++

/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: CBC.hpp
Date: 2022-10-08
Author: Reece
***/
#pragma once
namespace Aurora::Crypto::CBC
{
struct CBCContext : ICBCContext
{
bool Initialize(const Memory::MemoryViewRead &key,
const Memory::MemoryViewRead &iv) override;
bool GetIV(const Memory::MemoryViewWrite &writeView) override;
bool SetIV(const Memory::MemoryViewRead &readView) override;
bool TryInit(int iCipher);
bool Decrypt(int iCipher, const Memory::MemoryViewWrite &memoryView);
bool Encrypt(int iCipher, const Memory::MemoryViewWrite &memoryView);
private:
symmetric_CBC cbc_ {};
char streamKey_[32];
int iKeyLength {};
int iIVLength {};
int iLastCipher_ { -1 };
};
}