MCPcopy Create free account
hub / github.com/apache/mesos / validateDigest

Function validateDigest

src/oci/spec.cpp:33–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31namespace internal {
32
33Option<Error> validateDigest(const string& digest)
34{
35 vector<string> split = strings::split(digest, ":");
36 if (split.size() != 2) {
37 return Error("Incorrect 'digest' format: " + digest);
38 }
39
40 // TODO(qianzhang): Validate algorithm (split[0]) and hex (split[1]).
41
42 return None();
43}
44
45
46Option<Error> validate(const Index& index)

Callers 3

foreachFunction · 0.85
validateFunction · 0.85
parseFunction · 0.85

Calls 4

splitFunction · 0.85
NoneClass · 0.85
ErrorFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected