-
Notifications
You must be signed in to change notification settings - Fork 70
/
Copy pathCRC.cpp
32 lines (27 loc) · 950 Bytes
/
CRC.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/crt/checksum/CRC.h>
#include <aws/checksums/crc.h>
namespace Aws
{
namespace Crt
{
namespace Checksum
{
uint32_t ComputeCRC32(ByteCursor input, uint32_t previousCRC32) noexcept
{
return aws_checksums_crc32_ex(input.ptr, input.len, previousCRC32);
}
uint32_t ComputeCRC32C(ByteCursor input, uint32_t previousCRC32C) noexcept
{
return aws_checksums_crc32c_ex(input.ptr, input.len, previousCRC32C);
}
uint64_t ComputeCRC64NVME(ByteCursor input, uint64_t previousCRC64NVME) noexcept
{
return aws_checksums_crc64nvme_ex(input.ptr, input.len, previousCRC64NVME);
}
} // namespace Checksum
} // namespace Crt
} // namespace Aws