If you had done a general search in the code base you could have got them,
The CTransaction::ComputeHash() is present in
bitcoin/src/primitives/transaction.cpp #L65uint256 CTransaction::ComputeHash() const
{
return SerializeHash(*this, SER_GETHASH, SERIALIZE_TRANSACTION_NO_WITNESS);
}
uint256 CTransaction::ComputeWitnessHash() const
{
if (!HasWitness()) {
return hash;
}
return SerializeHash(*this, SER_GETHASH, 0);
}
BTW what are you trying to achieve with this?