summaryrefslogtreecommitdiff
path: root/asdcplib/src/KM_prng.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'asdcplib/src/KM_prng.cpp')
-rwxr-xr-xasdcplib/src/KM_prng.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/asdcplib/src/KM_prng.cpp b/asdcplib/src/KM_prng.cpp
index 06b22d91..463ae157 100755
--- a/asdcplib/src/KM_prng.cpp
+++ b/asdcplib/src/KM_prng.cpp
@@ -1,3 +1,5 @@
+/* -*- c-basic-offset: 2; -*- */
+
/*
Copyright (c) 2006-2009, John Hurst
All rights reserved.
@@ -98,7 +100,9 @@ public:
set_key(rng_key);
- m_libdcp_test_rng_state = 1;
+#ifdef LIBDCP_POSIX
+ reset();
+#endif
}
//
@@ -153,6 +157,13 @@ public:
/* XXX */
#endif
}
+
+#ifdef LIBDCP_POSIX
+ void reset ()
+ {
+ m_libdcp_test_rng_state = 1;
+ }
+#endif
};
@@ -206,6 +217,14 @@ Kumu::FortunaRNG::FillRandom(Kumu::ByteString& Buffer)
return Buffer.Data();
}
+#ifdef LIBDCP_POSIX
+void
+Kumu::FortunaRNG::Reset()
+{
+ s_RNG->reset();
+}
+#endif
+
//------------------------------------------------------------------------------------------
//