summaryrefslogtreecommitdiffstats
path: root/g10/misc.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1998-06-25 12:19:08 +0200
committerWerner Koch <wk@gnupg.org>1998-06-25 12:19:08 +0200
commit06fd61d081367d1c7bdf7fd653fe56527ee2320a (patch)
treede84926892e4038c81953f635f8c3c52a9945d62 /g10/misc.c
parentsome more internall structure changes (diff)
downloadgnupg2-06fd61d081367d1c7bdf7fd653fe56527ee2320a.tar.xz
gnupg2-06fd61d081367d1c7bdf7fd653fe56527ee2320a.zip
nearly ready for 0.3.0
Diffstat (limited to 'g10/misc.c')
-rw-r--r--g10/misc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/g10/misc.c b/g10/misc.c
index 0c2b6ac4a..470307363 100644
--- a/g10/misc.c
+++ b/g10/misc.c
@@ -152,3 +152,15 @@ checksum_mpi_counted_nbits( MPI a )
return csum;
}
+
+u32
+buffer_to_u32( const byte *buffer )
+{
+ unsigned long a;
+ a = *buffer << 24;
+ a |= buffer[1] << 16;
+ a |= buffer[2] << 8;
+ a |= buffer[3];
+ return a;
+}
+