Check digest type is correct