It cannot be better IMHO because of two reasons:

* it requires much more resources than erasing - same volume to write, but requires reading the initial value, and requires memory and computation time for encrypting
* it cannot be more secure than rewriting to a known and fixed value, because that process gives same result whatever the input was.

The problem in securely erasing is the possibility at a physical level to find the previous value of a sector. Writing an encrypted version instead of a fixed sequence should not help a lot here. So the common usage is to rewrite multiple time with different patterns in order to lower the possibility of recovering the original data, or to physicaly destroy the support.


This was for full disk erasure. If you want to be able to delete individual files, it may depend on the file system, OS and physical media. On the simple case where you have a simple magnetic disk, a file can be rewritten in place before deletion. In that case, the previous data will not be recoverable because it has ben replaced on the disk.

But there are different corner cases:

- Windows offers a functionality of automatic versioning of files. In that case, when you try to rewrite a file, you only write a new version of it, and the previous one subsist on disk.
- other OS offer versioned file system that result in the same problem as above
- some memory stick or SSD do not rewrite a file in place but always write on a new *sector*, in that case, you cannot erase a single file data.

That means that there is no secure and portable way to completely erase a single file. It works with simple file systems on magnetic disk (the most common use case), but can fail if the file system or media has special processing.