Lines Matching refs:value

28 std::string GetProtoDebugString(KeyType value) {
29 return GetProtoDebugStringWithIndent(value, 0);
32 std::string GetProtoDebugStringWithIndent(KeyType value, int indent_size) {
33 if (value == KEY_TYPE_RSA) {
36 if (value == KEY_TYPE_ECC) {
42 std::string GetProtoDebugString(KeyUsage value) {
43 return GetProtoDebugStringWithIndent(value, 0);
46 std::string GetProtoDebugStringWithIndent(KeyUsage value, int indent_size) {
47 if (value == KEY_USAGE_SIGN) {
50 if (value == KEY_USAGE_DECRYPT) {
56 std::string GetProtoDebugString(CertificateProfile value) {
57 return GetProtoDebugStringWithIndent(value, 0);
60 std::string GetProtoDebugStringWithIndent(CertificateProfile value,
62 if (value == ENTERPRISE_MACHINE_CERTIFICATE) {
65 if (value == ENTERPRISE_USER_CERTIFICATE) {
68 if (value == CONTENT_PROTECTION_CERTIFICATE) {
71 if (value == CONTENT_PROTECTION_CERTIFICATE_WITH_STABLE_ID) {
74 if (value == CAST_CERTIFICATE) {
77 if (value == GFSC_CERTIFICATE) {
83 std::string GetProtoDebugString(const Quote& value) {
84 return GetProtoDebugStringWithIndent(value, 0);
87 std::string GetProtoDebugStringWithIndent(const Quote& value, int indent_size) {
90 base::StringPrintf("[%s] {\n", value.GetTypeName().c_str());
92 if (value.has_quote()) {
96 base::HexEncode(value.quote().data(), value.quote().size()).c_str());
99 if (value.has_quoted_data()) {
103 base::HexEncode(value.quoted_data().data(), value.quoted_data().size())
107 if (value.has_quoted_pcr_value()) {
110 base::HexEncode(value.quoted_pcr_value().data(),
111 value.quoted_pcr_value().size())
115 if (value.has_pcr_source_hint()) {
118 base::HexEncode(value.pcr_source_hint().data(),
119 value.pcr_source_hint().size())
127 std::string GetProtoDebugString(const EncryptedData& value) {
128 return GetProtoDebugStringWithIndent(value, 0);
131 std::string GetProtoDebugStringWithIndent(const EncryptedData& value,
135 base::StringPrintf("[%s] {\n", value.GetTypeName().c_str());
137 if (value.has_wrapped_key()) {
141 base::HexEncode(value.wrapped_key().data(), value.wrapped_key().size())
145 if (value.has_iv()) {
149 base::HexEncode(value.iv().data(), value.iv().size()).c_str());
152 if (value.has_mac()) {
156 base::HexEncode(value.mac().data(), value.mac().size()).c_str());
159 if (value.has_encrypted_data()) {
162 base::HexEncode(value.encrypted_data().data(),
163 value.encrypted_data().size())
167 if (value.has_wrapping_key_id()) {
170 base::HexEncode(value.wrapping_key_id().data(),
171 value.wrapping_key_id().size())
179 std::string GetProtoDebugString(const SignedData& value) {
180 return GetProtoDebugStringWithIndent(value, 0);
183 std::string GetProtoDebugStringWithIndent(const SignedData& value,
187 base::StringPrintf("[%s] {\n", value.GetTypeName().c_str());
189 if (value.has_data()) {
193 base::HexEncode(value.data().data(), value.data().size()).c_str());
196 if (value.has_signature()) {
198 base::StringAppendF(&output, "%s", base::HexEncode(value.signature().data(),
199 value.signature().size())
207 std::string GetProtoDebugString(const EncryptedIdentityCredential& value) {
208 return GetProtoDebugStringWithIndent(value, 0);
212 const EncryptedIdentityCredential& value,
216 base::StringPrintf("[%s] {\n", value.GetTypeName().c_str());
218 if (value.has_asym_ca_contents()) {
221 base::HexEncode(value.asym_ca_contents().data(),
222 value.asym_ca_contents().size())
226 if (value.has_sym_ca_attestation()) {
229 base::HexEncode(value.sym_ca_attestation().data(),
230 value.sym_ca_attestation().size())