Commit 8f79db34 authored by Marek Kasik's avatar Marek Kasik

DecryptStream: Use Ref instead of two integers

Follow the changes introduced before also in this new code.
parent b1502076
Pipeline #58088 passed with stage
in 7 minutes and 29 seconds
......@@ -130,8 +130,8 @@ void aesEncryptArray(const unsigned char *IV,
//------------------------------------------------------------------------
EncryptStream::EncryptStream(Stream *strA, const unsigned char *fileKey, CryptAlgorithm algoA,
int keyLength, int objNum, int objGen):
BaseCryptStream(strA, fileKey, algoA, keyLength, objNum, objGen)
int keyLength, Ref refA):
BaseCryptStream(strA, fileKey, algoA, keyLength, refA)
{
// Fill the CBC initialization vector for AES and AES-256
switch (algo) {
......@@ -222,8 +222,8 @@ int EncryptStream::lookChar() {
//------------------------------------------------------------------------
DecryptStream::DecryptStream(Stream *strA, const unsigned char *fileKey, CryptAlgorithm algoA,
int keyLength, int objNum, int objGen):
BaseCryptStream(strA, fileKey, algoA, keyLength, objNum, objGen)
int keyLength, Ref refA):
BaseCryptStream(strA, fileKey, algoA, keyLength, refA)
{
}
......
......@@ -101,7 +101,7 @@ class EncryptStream : public BaseCryptStream {
public:
EncryptStream(Stream *strA, const unsigned char *fileKey, CryptAlgorithm algoA,
int keyLength, int objNum, int objGen);
int keyLength, Ref ref);
~EncryptStream();
void reset() override;
int lookChar() override;
......@@ -119,7 +119,7 @@ class DecryptStream : public BaseCryptStream {
public:
DecryptStream(Stream *strA, const unsigned char *fileKey, CryptAlgorithm algoA,
int keyLength, int objNum, int objGen);
int keyLength, Ref ref);
~DecryptStream();
void reset() override;
int lookChar() override;
......
......@@ -107,8 +107,8 @@ void aesEncryptArray(const unsigned char *IV,
//------------------------------------------------------------------------
EncryptStream::EncryptStream(Stream *strA, const unsigned char *fileKey, CryptAlgorithm algoA,
int keyLength, int objNum, int objGen):
BaseCryptStream(strA, fileKey, algoA, keyLength, objNum, objGen)
int keyLength, Ref refA):
BaseCryptStream(strA, fileKey, algoA, keyLength, refA)
{
// Fill the CBC initialization vector for AES and AES-256
if (algo == cryptAES || algo == cryptAES256)
......@@ -207,8 +207,8 @@ int EncryptStream::lookChar() {
//------------------------------------------------------------------------
DecryptStream::DecryptStream(Stream *strA, const unsigned char *fileKey, CryptAlgorithm algoA,
int keyLength, int objNum, int objGen):
BaseCryptStream(strA, fileKey, algoA, keyLength, objNum, objGen)
int keyLength, Ref refA):
BaseCryptStream(strA, fileKey, algoA, keyLength, refA)
{
switch (algo) {
case cryptRC4:
......
......@@ -95,7 +95,7 @@ class EncryptStream : public BaseCryptStream {
public:
EncryptStream(Stream *strA, const unsigned char *fileKey, CryptAlgorithm algoA,
int keyLength, int objNum, int objGen);
int keyLength, Ref ref);
~EncryptStream();
void reset() override;
int lookChar() override;
......@@ -112,7 +112,7 @@ class DecryptStream : public BaseCryptStream {
public:
DecryptStream(Stream *strA, const unsigned char *fileKey, CryptAlgorithm algoA,
int keyLength, int objNum, int objGen);
int keyLength, Ref ref);
~DecryptStream();
void reset() override;
int lookChar() override;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment