Class ManifestDigest
A manifest digest is a means of uniquely identifying an Implementation and verifying its contents.
Inheritance
ManifestDigest
Assembly: ZeroInstall.Model.dll
Syntax
public sealed class ManifestDigest : ValueType
Constructors
ManifestDigest(String)
Creates a new manifest digest structure by parsing a string.
Declaration
public ManifestDigest(string value)
Parameters
Type |
Name |
Description |
String |
value |
One or more comma separated digest values.
|
Exceptions
ManifestDigest(String, String, String, String)
A manifest digest is a means of uniquely identifying an Implementation and verifying its contents.
Declaration
public ManifestDigest(string Sha1 = null, string Sha1New = null, string Sha256 = null, string Sha256New = null)
Parameters
Type |
Name |
Description |
String |
Sha1 |
A SHA-1 hash of the old manifest format. Not supported anymore!
|
String |
Sha1New |
A SHA-1 hash of the new manifest format.
|
String |
Sha256 |
A SHA-256 hash of the new manifest format. (most secure)
|
String |
Sha256New |
A SHA-256 hash of the new manifest format with a base32 encoding and no equals sign in the path.
|
Fields
Empty
The manifest digest of an empty directory.
Declaration
public static readonly ManifestDigest Empty
Field Value
UnknownAlgorithms
Contains any unknown hash algorithms specified as pure XML attributes.
Declaration
public XmlAttribute[] UnknownAlgorithms
Field Value
Properties
AvailableDigests
Lists all contained manifest digests sorted from best (safest) to worst.
Declaration
public IEnumerable<string> AvailableDigests { get; }
Property Value
Best
Declaration
public string Best { get; }
Property Value
Sha1
A SHA-1 hash of the old manifest format. Not supported anymore!
Declaration
public string Sha1 { get; set; }
Property Value
Sha1New
A SHA-1 hash of the new manifest format.
Declaration
public string Sha1New { get; set; }
Property Value
Sha256
A SHA-256 hash of the new manifest format. (most secure)
Declaration
public string Sha256 { get; set; }
Property Value
Sha256New
A SHA-256 hash of the new manifest format with a base32 encoding and no equals sign in the path.
Declaration
public string Sha256New { get; set; }
Property Value
Methods
Deconstruct(out String, out String, out String, out String)
Declaration
public void Deconstruct(out string Sha1, out string Sha1New, out string Sha256, out string Sha256New)
Parameters
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
Equals(ManifestDigest)
Declaration
public bool Equals(ManifestDigest other)
Parameters
Returns
GetHashCode()
Declaration
public override int GetHashCode()
Returns
PartialEquals(ManifestDigest)
Indicates whether this digest is at least partially equal to another one.
Declaration
public bool PartialEquals(ManifestDigest other)
Parameters
Returns
ToString()
Returns the manifest digests in the form "sha1new=abc123,sha256new_ABC123,...". Safe for parsing!
Declaration
public override string ToString()
Returns
TryParse(String)
Tries to parse a string containing a digest value.
Does nothing if the corresponding algorithm is already set or if the string contains no known digest algorithm.
Declaration
public void TryParse(string digest)
Parameters
Type |
Name |
Description |
String |
digest |
|
Operators
Equality(ManifestDigest, ManifestDigest)
Declaration
public static bool operator ==(ManifestDigest left, ManifestDigest right)
Parameters
Returns
Inequality(ManifestDigest, ManifestDigest)
Declaration
public static bool operator !=(ManifestDigest left, ManifestDigest right)
Parameters
Returns
Implements