mirror of
https://github.com/jakcron/nstool.git
synced 2024-12-22 18:55:29 +00:00
[crypto] Add operators to sAesIvCtr
This commit is contained in:
parent
cdd11d58c6
commit
f542b54154
|
@ -78,10 +78,23 @@ namespace aes
|
|||
memcpy(this->iv, iv, kAes128KeySize);
|
||||
}
|
||||
|
||||
bool compare(const sAesIvCtr& other) const
|
||||
{
|
||||
return memcmp(this->iv, other.iv, kAesBlockSize) == 0;
|
||||
}
|
||||
|
||||
void operator=(const sAesIvCtr& other)
|
||||
{
|
||||
set(other.iv);
|
||||
}
|
||||
bool operator==(const sAesIvCtr& other) const
|
||||
{
|
||||
return compare(other);
|
||||
}
|
||||
bool operator!=(const sAesIvCtr& other) const
|
||||
{
|
||||
return !compare(other);
|
||||
}
|
||||
};
|
||||
#pragma pack (pop)
|
||||
|
||||
|
|
Loading…
Reference in a new issue