IntegrityTag

A subresource integrity declaration

Implement the SRI (Subresource Integrity) standard, used to validate that a given dependency is of the expected version.

One may get an integrity tag in base64 using openssl:

$ cat vibe.d-0.10.1.zip |  openssl dgst -binary -sha512 | base64
vwQ9tYTjLb981j41+3GZZUgKXm/5PlKpmY2bplRSUM8ajL03++LGm/TcfFFarJrHex8CTb5ZLWdi
Y1fFAOSkSw==

Constructors

this
this(string value)

Parses a string representation as an IntegrityTag

this
this(string algorithm, string value)

Internal constructor for IntegrityTag.make

Members

Functions

matches
bool matches(ubyte[] data)

Verify if the data passed in parameter matches this IntegrityTag

Static functions

make
IntegrityTag make(ubyte[] data, string algorithm)

Build and returns an IntegrityTag

Variables

algorithm
string algorithm;

The hash function to use

value
string value;

The value of the digest computed with algorithm, base64-encoded

See Also

Meta