CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
hash.cc File Reference
#include "cvmfs_config.h"
#include "crypto/hash.h"
#include <alloca.h>
#include <errno.h>
#include <fcntl.h>
#include <openssl/hmac.h>
#include <openssl/md5.h>
#include <openssl/ripemd.h>
#include <openssl/sha.h>
#include <unistd.h>
#include <cstdio>
#include <cstring>
#include "crypto/openssl_version.h"
#include "util/exception.h"
#include "KeccakHash.h"
Include dependency graph for hash.cc:

Go to the source code of this file.

Namespaces

 shash
 

Functions

Algorithms shash::ParseHashAlgorithm (const string &algorithm_option)
 
Any shash::MkFromHexPtr (const HexPtr hex, const char suffix)
 
Any shash::MkFromSuffixedHexPtr (const HexPtr hex)
 
unsigned shash::GetContextSize (const Algorithms algorithm)
 
void shash::Init (ContextPtr context)
 
void shash::Update (const unsigned char *buffer, const unsigned buffer_length, ContextPtr context)
 
void shash::Final (ContextPtr context, Any *any_digest)
 
void shash::HashMem (const unsigned char *buffer, const unsigned buffer_size, Any *any_digest)
 
void shash::HashString (const std::string &content, Any *any_digest)
 
void shash::Hmac (const string &key, const unsigned char *buffer, const unsigned buffer_size, Any *any_digest)
 
bool shash::HashFd (int fd, Any *any_digest)
 
bool shash::HashFile (const std::string &filename, Any *any_digest)
 
static string shash::HexFromSha256 (unsigned char digest[SHA256_DIGEST_LENGTH])
 
string shash::Sha256File (const string &filename)
 
string shash::Sha256Mem (const unsigned char *buffer, const unsigned buffer_size)
 
string shash::Sha256String (const string &content)
 
std::string shash::Hmac256 (const std::string &key, const std::string &content, bool raw_output)
 

Variables

const char * shash::kAlgorithmIds []