INNER CODE UNIT · C++
checksum_type_to_nid
trailofbits/uthenticode · src/uthenticode.cpp:98
static inline int checksum_type_to_nid(checksum_kind kind) {
switch (kind) {
default:
return NID_undef;
case checksum_kind::MD5:
return NID_md5;
case checksum_kind::SHA1:
return NID_sha1;
case checksum_kind::SHA256:
return NID_sha256;
}
}
/**
* Convert the given OpenSSL NID to a checksum_kind.
*
* @param nid the NID to convert
* @return the corresponding checksum_kind