aboutsummaryrefslogtreecommitdiffstats
path: root/common/rdr/RandomStream.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'common/rdr/RandomStream.cxx')
-rw-r--r--common/rdr/RandomStream.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/common/rdr/RandomStream.cxx b/common/rdr/RandomStream.cxx
index 485259cf..3a524102 100644
--- a/common/rdr/RandomStream.cxx
+++ b/common/rdr/RandomStream.cxx
@@ -50,11 +50,11 @@ RandomStream::RandomStream()
if (GetLastError() == (DWORD)NTE_BAD_KEYSET) {
if (!CryptAcquireContext(&provider, nullptr, nullptr,
PROV_RSA_FULL, CRYPT_NEWKEYSET)) {
- vlog.error("unable to create keyset");
+ vlog.error("Unable to create keyset");
provider = 0;
}
} else {
- vlog.error("unable to acquire context");
+ vlog.error("Unable to acquire context");
provider = 0;
}
}
@@ -69,7 +69,7 @@ RandomStream::RandomStream()
{
#endif
#endif
- vlog.error("no OS supplied random source - using rand()");
+ vlog.error("No OS supplied random source, using rand()");
seed += (unsigned int) time(nullptr) + getpid() + getpid() * 987654 + rand();
srand(seed);
}
@@ -89,7 +89,7 @@ bool RandomStream::fillBuffer() {
#ifdef RFB_HAVE_WINCRYPT
if (provider) {
if (!CryptGenRandom(provider, availSpace(), (uint8_t*)end))
- throw rdr::win32_error("unable to CryptGenRandom", GetLastError());
+ throw rdr::win32_error("Unable to CryptGenRandom", GetLastError());
end += availSpace();
} else {
#else
@@ -97,7 +97,7 @@ bool RandomStream::fillBuffer() {
if (fp) {
size_t n = fread((uint8_t*)end, 1, availSpace(), fp);
if (n <= 0)
- throw rdr::posix_error("reading /dev/urandom or /dev/random "
+ throw rdr::posix_error("Reading /dev/urandom or /dev/random "
"failed", errno);
end += n;
} else {