diff src/pk/pkcs1/pkcs_1_pss_decode.c @ 209:39d5d58461d6 libtomcrypt-orig LTC_1.05

Import of libtomcrypt 1.05
author Matt Johnston <matt@ucc.asn.au>
date Wed, 06 Jul 2005 03:53:40 +0000
parents 1c15b283127b
children
line wrap: on
line diff
--- a/src/pk/pkcs1/pkcs_1_pss_decode.c	Fri May 06 13:23:02 2005 +0000
+++ b/src/pk/pkcs1/pkcs_1_pss_decode.c	Wed Jul 06 03:53:40 2005 +0000
@@ -87,14 +87,13 @@
    }
 
    /* copy out the DB */
-   for (x = 0; x < modulus_len - hLen - 1; x++) {
-      DB[x] = sig[x];
-   }
+   x = 0;
+   XMEMCPY(DB, sig + x, modulus_len - hLen - 1);
+   x += modulus_len - hLen - 1;
 
    /* copy out the hash */
-   for (y = 0; y < hLen; y++) {
-      hash[y] = sig[x++];
-   }
+   XMEMCPY(hash, sig + x, hLen);
+   x += hLen;
 
    /* check the MSB */
    if ((sig[0] & ~(0xFF >> ((modulus_len<<3) - (modulus_bitlen-1)))) != 0) {
@@ -172,3 +171,7 @@
 }
 
 #endif /* PKCS_1 */
+
+/* $Source: /cvs/libtom/libtomcrypt/src/pk/pkcs1/pkcs_1_pss_decode.c,v $ */
+/* $Revision: 1.4 $ */
+/* $Date: 2005/05/05 14:35:59 $ */