Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
sese::MessageDigest Class Referencefinal

Message digest utility class. More...

#include <MessageDigest.h>

Inheritance diagram for sese::MessageDigest:
sese::NotInstantiable

Public Types

enum  Type { MD5 , SHA1 , SHA256 }
 
using InputStream = sese::io::InputStream
 

Public Member Functions

 MessageDigest ()=delete
 
- Public Member Functions inherited from sese::NotInstantiable
 NotInstantiable ()=delete
 
virtual ~NotInstantiable ()=default
 
 NotInstantiable (const NotInstantiable &)=delete
 
NotInstantiableoperator= (const NotInstantiable &)=delete
 

Static Public Member Functions

static std::unique_ptr< char[]> digest (Type type, const InputStream::Ptr &source, bool is_cap=false) noexcept
 
static std::unique_ptr< char[]> digest (Type type, InputStream *source, bool is_cap=false) noexcept
 

Detailed Description

Message digest utility class.

Member Typedef Documentation

◆ InputStream

Member Enumeration Documentation

◆ Type

Enumerator
MD5 
SHA1 
SHA256 

Constructor & Destructor Documentation

◆ MessageDigest()

sese::MessageDigest::MessageDigest ( )
delete

Member Function Documentation

◆ digest() [1/2]

std::unique_ptr< char[]> sese::MessageDigest::digest ( Type type,
const InputStream::Ptr & source,
bool is_cap = false )
staticnoexcept

Perform digest

Parameters
typeDigest algorithm type
sourceSource of information
is_capWhether letters are uppercase
Return values
nullptrDigest failed
Returns
Digest result

References sese::MD5Util::encode(), sese::SHA1Util::encode(), and sese::SHA256Util::encode().

◆ digest() [2/2]

std::unique_ptr< char[]> sese::MessageDigest::digest ( Type type,
InputStream * source,
bool is_cap = false )
staticnoexcept

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