aboutsummaryrefslogtreecommitdiffstats
path: root/g10/misc.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-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;
+}
+