$randomnessSource
$randomnessSource : \CryptoManana\Core\Abstractions\Randomness\AbstractGenerator
The pseudo-random generator service property storage.
The randomness generator.
Class FileShredder - Utility class for file shredding.
$randomnessSource : \CryptoManana\Core\Abstractions\Randomness\AbstractGenerator|null
The pseudo-random generator service property storage.
__construct(\CryptoManana\Core\Abstractions\Randomness\AbstractGenerator|null $generator = null)
Container constructor.
\CryptoManana\Core\Abstractions\Randomness\AbstractGenerator|null | $generator | The pseudo-random generator service. |
Initialization validation.
seedRandomGenerator(null|integer $seed = null) : $this
Pass a seed value to the pseudo-randomness generator service.
null|integer | $seed | Seed value in integer format or null for auto-seeding. |
Validation errors and service misuse.
The container object.
setRandomGenerator(\CryptoManana\Core\Abstractions\Randomness\AbstractGenerator $generator) : $this
Setter for the pseudo-random generator service.
\CryptoManana\Core\Abstractions\Randomness\AbstractGenerator | $generator | The pseudo-random generator service. |
The container object.
getRandomGenerator() : \CryptoManana\Core\Abstractions\Randomness\AbstractGenerator|null
Getter for the pseudo-random generator service.
The currently injected pseudo-random generator service.
writeContentToFile(string $filename, integer $pass, integer $flag) : boolean
Internal method for writing of pseudo-random content to a file.
string | $filename | The filename and location. |
integer | $pass | The current iteration pass logic. |
integer | $flag | The file handle lock flag. |
Validation or filesystem errors.
The write operation result.
fileShredding(string $filename) : boolean
Internal method for shredding the physical file based on the DOD 5220.22-M (3 passes) standard.
string | $filename | The filename and location. |
Validation or filesystem errors.
The file shredding operation result.