28 if (kekName.size() < 2 || kekName.get(-2) !=
KEK) {
33 return kekName.getPrefix(-2).append(
KDK).append(kekName.get(-1));
36 std::tuple<Name, Name, Name>
41 if (ckDataName.size() < ckName.size() + 1 ||
42 ckDataName.getPrefix(ckName.size()) != ckName ||
48 auto kekName = ckDataName.getSubName(ckName.size() + 1);
50 kekName.getPrefix(-2),
51 kekName.getPrefix(-2).append(
"KEY").append(kekName.get(-1))};
const name::Component KDK
std::tuple< Name, Name, Name > extractKdkInfoFromCkName(const Name &ckDataName, const Name &ckName, const ErrorCallback &onFailure)
Extract KDK information from name of CK data packet name.
Name convertKekNameToKdkPrefix(const Name &kekName, const ErrorCallback &onFailure)
Convert KEK name to KDK prefix:
std::function< void(const ErrorCode &, const std::string &)> ErrorCallback
const name::Component ENCRYPTED_BY
const name::Component KEK