Result check at `Security::generateRandomKey()` added