Aktualizr
C++ SOTA Client
Public Types | Public Member Functions | Friends | List of all members
Uptane::Hash Class Reference

The hash of a file or TUF metadata. More...

#include <tuf.h>

Public Types

enum  Type { kSha256, kSha512, kUnknownAlgorithm }
 

Public Member Functions

 Hash (const std::string &type, const std::string &hash)
 
 Hash (Type type, const std::string &hash)
 
bool HaveAlgorithm () const
 
bool operator== (const Hash &other) const
 
bool operator!= (const Hash &other) const
 
std::string TypeString () const
 
Type type () const
 
std::string HashString () const
 

Friends

std::ostream & operator<< (std::ostream &os, const Hash &h)
 

Detailed Description

The hash of a file or TUF metadata.

File hashes/checksums in TUF include the length of the object, in order to defeat infinite download attacks.

Definition at line 139 of file tuf.h.


The documentation for this class was generated from the following files: