Does encryption prior to a factory reset protect you

Clocks

Well-known member
Aug 27, 2010
2,009
18
0
If you are selling a phone and you go through the process of encrypting the device with a long/random password prior to doing a factory reset, will that prevent a future owner from recovering files from your phone using a tool like DiskDigger or other recovery software?

My thought process is if the whole disk is encrypted, then wiped, anything found by recovery software would be gibberish.