I need to write a program which, given a password protected DOC file and a string, checks whether the string is the password of the file.

Any ideas on how to approach this problem?