How to get passed a forgotten encrypted phone lock code

Factory reset and wipe the device clean. No way to recover an encryption key unless you remember it (that's the whole point of encrypting a device). Sorry :(