Created SILC Crypto Toolkit git repository.
[crypto.git] / lib / silcmath / mp_tfm.c
index 1abbf5078fc5ec0f52a6711b4313c5a521958390..f636ab1dda1df2126b340f7f4c6c833756281c3b 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2005 Pekka Riikonen
+  Copyright (C) 2005 - 2006 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -16,9 +16,8 @@
   GNU General Public License for more details.
 
 */
-/* $Id$ */
 
-#include "silcincludes.h"
+#include "silccrypto.h"
 #include "mp_tfm.h"
 
 void silc_mp_init(SilcMPInt *mp)
@@ -67,8 +66,8 @@ void silc_mp_set_str(SilcMPInt *dst, const char *str, int base)
 
 SilcUInt32 silc_mp_get_ui(SilcMPInt *mp)
 {
-  SILC_NOT_IMPLEMENTED("silc_mp_get_ui");
-  assert(FALSE);
+  fp_int *tmp = mp;
+  return tmp->used > 0 ? tmp->dp[0] : 0;
 }
 
 char *silc_mp_get_str(char *str, SilcMPInt *mp, int base)