summaryrefslogtreecommitdiff
path: root/src/asdcp-util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/asdcp-util.cpp')
-rwxr-xr-xsrc/asdcp-util.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/asdcp-util.cpp b/src/asdcp-util.cpp
index a3c891d..d93465c 100755
--- a/src/asdcp-util.cpp
+++ b/src/asdcp-util.cpp
@@ -35,8 +35,8 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <KM_fileio.h>
#include <KM_prng.h>
+#include <KM_sha1.h>
#include <AS_DCP.h>
-#include <openssl/sha.h>
using namespace Kumu;
@@ -182,7 +182,7 @@ Result_t
digest_file(const std::string& filename)
{
FileReader Reader;
- SHA_CTX Ctx;
+ SHA1_CTX Ctx;
SHA1_Init(&Ctx);
ByteString Buf(8192);
@@ -244,17 +244,15 @@ main(int argc, const char** argv)
if ( Options.mode == MMT_GEN_KEY )
{
- Kumu::FortunaRNG RNG;
- byte_t bin_buf[ASDCP::KeyLen];
-
- RNG.FillRandom(bin_buf, ASDCP::KeyLen);
- printf("%s\n", Kumu::bin2hex(bin_buf, ASDCP::KeyLen, str_buf, 64));
+ SymmetricKey key_value;
+ Kumu::GenRandomValue(key_value);
+ printf("%s\n", key_value.EncodeHex(str_buf, 64));
}
else if ( Options.mode == MMT_GEN_ID )
{
- UUID TmpID;
- Kumu::GenRandomValue(TmpID);
- printf("%s\n", TmpID.EncodeHex(str_buf, 64));
+ UUID id_value;
+ Kumu::GenRandomValue(id_value);
+ printf("%s\n", id_value.EncodeHex(str_buf, 64));
}
else if ( Options.mode == MMT_DIGEST )
{