Windows 10 has an option to do a full wipe (running HDD with 00000s before reinstall) in the settings (under Restore, which is in Update and Security, IIRC). Run that, it'll completely wipe the drive so no one can restore files and reinstall Windows for you.
For your iPhone, make sure you remove your iCloud account before doing anything (if applicable), and then just use the built in reset option in settings. iDevices use a physical security chip to encrypt data automatically, but the encryption key is reset once the device is reset (and iCloud removed) so that's all you'll need to do there to securely wipe your iPhone