15#ifndef GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_HASHING_OPTIONS_H
16#define GOOGLE_CLOUD_CPP_GOOGLE_CLOUD_STORAGE_HASHING_OPTIONS_H
18#include "google/cloud/storage/internal/complex_option.h"
19#include "google/cloud/storage/version.h"
20#include "absl/strings/string_view.h"
26GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_BEGIN
28
29
30
31
32
33
34
35
36
37
38
40 :
public internal::ComplexOption<
MD5HashValue, std::string> {
41 using ComplexOption<
MD5HashValue, std::string>::ComplexOption;
45 static char const*
name() {
return "md5-hash-value"; }
49
50
59 : absl::string_view{payload}
);
63
64
65
66
67
68
69
70
71
72
73
79 static char const*
name() {
return "disable-md5-hash"; }
83
84
85
86
87
91
92
93
94
95
96
97
98
99
100
101
108 static char const*
name() {
return "crc32c-checksum"; }
112
113
122 : absl::string_view{payload}
);
126
127
128
129
130
131
132
133
134
135
136
137
144 static char const*
name() {
return "disable-crc32c-checksum"; }
147GOOGLE_CLOUD_CPP_INLINE_NAMESPACE_END
Contains all the Google Cloud Storage C++ client APIs.
Definition: auto_finalize.h:24
std::string ComputeCrc32cChecksum(std::string const &payload)
Compute the CRC32C checksum of a buffer in the format preferred by GCS.
std::string ComputeMD5Hash(absl::string_view payload)
Compute the MD5 Hash of a buffer in the format preferred by GCS.
std::string ComputeCrc32cChecksum(absl::string_view payload)
Compute the CRC32C checksum of a buffer in the format preferred by GCS.
std::string ComputeMD5Hash(char const *payload)
Compute the MD5 Hash of a buffer in the format preferred by GCS.
Definition: hashing_options.h:57
DisableMD5Hash EnableMD5Hash()
Enable MD5 hashes in upload and download operations.
Definition: hashing_options.h:88
std::string ComputeMD5Hash(std::string const &payload)
Compute the MD5 Hash of a buffer in the format preferred by GCS.
std::string ComputeCrc32cChecksum(char const *payload)
Compute the CRC32C checksum of a buffer in the format preferred by GCS.
Definition: hashing_options.h:120
Provide a pre-computed CRC32C checksum value.
Definition: hashing_options.h:103
Crc32cChecksumValue()=default
static char const * name()
Definition: hashing_options.h:108
Disable CRC32C checksum computations.
Definition: hashing_options.h:139
static char const * name()
Definition: hashing_options.h:144
DisableCrc32cChecksum()=default
Disable or enable MD5 Hashing computations.
Definition: hashing_options.h:74
static char const * name()
Definition: hashing_options.h:79
DisableMD5Hash()
Definition: hashing_options.h:78
Provide a pre-computed MD5 hash value.
Definition: hashing_options.h:40
static char const * name()
Definition: hashing_options.h:45