I'm using cdrecord in a program that burns some data to a cd.

How can I verify the data once the cd has been burned?

Similar to the option that is given on most burn programs to verify data but, in this case I would like to verify the data through my program.

Im using RHEL 4