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 an ID string.
Declaration
public ManifestDigest(string id)
Parameters
Type |
Name |
Description |
String |
id |
The ID string to parse. Digest values start with their format name followed by an equals sign and the actual hash.
|
Exceptions
ManifestDigest(String, String, String, String)
Creates a new manifest digest structure with pre-set values.
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.
|
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
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
ParseID(String)
Parses an ID string, checking for digest values. The values will be added to this object if the corresponding digest value hasn't been set already.
Declaration
public void ParseID(string id)
Parameters
Type |
Name |
Description |
String |
id |
The ID string to parse. Digest values start with their format name followed by an equals sign and the actual hash.
|
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 "Algorithm1=Hash1, Algorithm2=Hash2, ...". Not safe for parsing!
Declaration
public override string ToString()
Returns
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