本文整理汇总了C++中Credential::childdata方法的典型用法代码示例。如果您正苦于以下问题:C++ Credential::childdata方法的具体用法?C++ Credential::childdata怎么用?C++ Credential::childdata使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Credential
的用法示例。
在下文中一共展示了Credential::childdata方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CheckProto_1
//.........这里部分代码省略.........
}
case (KEYMODE_PRIVATE) : {
isPrivate = true;
if (keyCredential) {
expectedSigCount++; // private self-signature
}
break;
}
case (KEYMODE_NULL) : { break; }
default : {
std::cerr << "Verify serialized credential failed: invalid mode ("
<< actualMode << ")." << std::endl;
return false;
}
}
if (!serializedCred.has_nymid()) {
std::cerr << "Verify serialized credential failed: missing NymID."
<< std::endl;
return false;
}
if (MIN_PLAUSIBLE_IDENTIFIER > serializedCred.nymid().size()) {
std::cerr << "Verify serialized credential failed: invalid NymID ("
<< serializedCred.nymid() << ")." << std::endl;
return false;
}
if (!masterCredential) {
if (!serializedCred.has_childdata()) {
std::cerr << "Verify serialized credential failed: missing child "
<< "data." << std::endl;
return false;
}
validChildData = Check(
serializedCred.childdata(),
CredentialAllowedChildParams.at(serializedCred.version()).first,
CredentialAllowedChildParams.at(serializedCred.version()).second);
if (!validChildData) {
std::cerr << "Verify serialized credential failed: invalid child "
<< "data." << std::endl;
return false;
}
}
if (masterCredential) {
if (!serializedCred.has_masterdata()) {
std::cerr << "Verify serialized credential failed: missing master "
<< "data." << std::endl;
return false;
}
validMasterData = Check(
serializedCred.masterdata(),
CredentialAllowedMasterParams.at(serializedCred.version()).first,
CredentialAllowedChildParams.at(serializedCred.version()).second,
expectSourceSignature);