cvmfs/hash.cc
unsigned GetContextSize(const Algorithms algorithm) {
  switch (algorithm) {
    case kMd5:
      return sizeof(MD5_CTX);
    case kSha1:
      return sizeof(SHA_CTX);
    case kRmd160:
      return sizeof(RIPEMD160_CTX);
    case kShake128:
      return sizeof(Keccak_HashInstance);
    default:
      LogCvmfs(kLogHash, kLogDebug | kLogSyslogErr, "tried to generate hash "
               "context for unspecified hash. Aborting...");
      abort();  // Undefined hash
  }
}
/**
 * Allows the caller to create the context on the stack.
 */
Allows the caller to create the context on the stack.
Allows the caller to create the context on the stack .
unsigned GetContextSize(const Algorithms algorithm) {
  switch (algorithm) {
    case kMd5:
      return sizeof(MD5_CTX);
    case kSha1:
      return sizeof(SHA_CTX);
    case kRmd160:
      return sizeof(RIPEMD160_CTX);
    case kShake128:
      return sizeof(Keccak_HashInstance);
    default:
      LogCvmfs(kLogHash, kLogDebug | kLogSyslogErr, "tried to generate hash "
               "context for unspecified hash. Aborting...");
      abort();  
  }
}
unsigned GetContextSize ( const Algorithms algorithm ) { switch ( algorithm ) { case kMd5 : return sizeof ( MD5_CTX ) ; case kSha1 : return sizeof ( SHA_CTX ) ; case kRmd160 : return sizeof ( RIPEMD160_CTX ) ; case kShake128 : return sizeof ( Keccak_HashInstance ) ; default : LogCvmfs ( kLogHash , kLogDebug | kLogSyslogErr , " " " " ) ; abort ( ) ; } }
Allows the caller to create the context on the stack.
Allows the caller to create the context on the stack .
// Undefined hash