I have given a shot at trying to find the largest prime number for a given number, and thought of using Fermat's Factorization Method. I might be sitting the pot miss and I think I am going about this the wrong way (or I am making shallow assumptions again).
Let me start with a small example:

Will it be safe to assume that 17 is the largest prime for 255? if not so, are there any other methods I can use to get the largest prime factor for any given number > 2?
I Resorted to programming a C# Solution and came to the conclusion that Fermat's Factorization is good at Finding Factors, not primes, for a given number ( but at times, a + b or a - b may be the largest prime by coincidence). The pseudo logic for the solution followed:
return the recorder
Now, I am not sure whether I may post my programmatic solution (this is math.stackexchange, not stackoverflow), and will remove it if necessary.