Represents a SHA-256 cryptographic checksum. 
See also https://en.wikipedia.org/wiki/SHA-2.
This class is not bound in pydrake, because Python programmers should prefer using https://docs.python.org/3/library/hashlib.html instead. 
 
#include <drake/common/sha256.h>
 | 
| static Sha256  | Checksum (std::string_view data) | 
|   | Computes the checksum of the given data buffer.  More...
  | 
|   | 
| static Sha256  | Checksum (std::istream *stream) | 
|   | Computes the checksum of the given stream.  More...
  | 
|   | 
| static std::optional< Sha256 >  | Parse (std::string_view sha256) | 
|   | Parses the 64-character ASCII hex representation of a SHA-256 checksum.  More...
  | 
|   | 
◆ Sha256() [1/3]
◆ Sha256() [2/3]
◆ Sha256() [3/3]
Constructs an all-zero checksum. 
Note that this is NOT the same as the checksum of empty (zero-sized) data. 
 
 
◆ Checksum() [1/2]
  
  
      
        
          | static Sha256 Checksum  | 
          ( | 
          std::string_view  | 
          data | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Computes the checksum of the given data buffer. 
 
 
◆ Checksum() [2/2]
  
  
      
        
          | static Sha256 Checksum  | 
          ( | 
          std::istream *  | 
          stream | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Computes the checksum of the given stream. 
Does not check for istream errors; that is the responsibility of the caller. 
- Precondition
 - stream != nullptr. 
 
 
 
◆ operator!=()
      
        
          | bool operator!=  | 
          ( | 
          const Sha256 &  | 
          other | ) | 
           const | 
        
      
 
 
◆ operator<()
      
        
          | bool operator<  | 
          ( | 
          const Sha256 &  | 
          other | ) | 
           const | 
        
      
 
 
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ operator==()
      
        
          | bool operator==  | 
          ( | 
          const Sha256 &  | 
          other | ) | 
           const | 
        
      
 
 
◆ Parse()
  
  
      
        
          | static std::optional<Sha256> Parse  | 
          ( | 
          std::string_view  | 
          sha256 | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Parses the 64-character ASCII hex representation of a SHA-256 checksum. 
Returns std::nullopt if the argument is an invalid checksum. 
 
 
◆ to_string()
      
        
          | std::string to_string  | 
          ( | 
           | ) | 
           const | 
        
      
 
Returns the 64-character ASCII hex representation of this checksum. 
 
 
◆ std::hash< Sha256 >
  
  
      
        
          | friend class std::hash< Sha256 > | 
         
       
   | 
  
friend   | 
  
 
 
The documentation for this class was generated from the following file: