fix format
This commit is contained in:
		
							parent
							
								
									82a2d385db
								
							
						
					
					
						commit
						cdbb9ca925
					
				| @ -21,8 +21,7 @@ void mp_dr_setup(mp_int *a, mp_digit *d) | |||||||
|    /* the casts are required if DIGIT_BIT is one less than
 |    /* the casts are required if DIGIT_BIT is one less than
 | ||||||
|     * the number of bits in a mp_digit [e.g. DIGIT_BIT==31] |     * the number of bits in a mp_digit [e.g. DIGIT_BIT==31] | ||||||
|     */ |     */ | ||||||
|    *d = (mp_digit)((((mp_word)1) << ((mp_word)DIGIT_BIT)) - |    *d = (mp_digit)((((mp_word)1) << ((mp_word)DIGIT_BIT)) - ((mp_word)a->dp[0])); | ||||||
|         ((mp_word)a->dp[0])); |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| #endif | #endif | ||||||
|  | |||||||
| @ -52,11 +52,9 @@ int mp_export(void* rop, size_t* countp, int order, size_t size, | |||||||
| 
 | 
 | ||||||
|    for (i = 0; i < count; ++i) { |    for (i = 0; i < count; ++i) { | ||||||
|       for (j = 0; j < size; ++j) { |       for (j = 0; j < size; ++j) { | ||||||
|          unsigned char* byte = ( |          unsigned char *byte = (unsigned char *)rop + | ||||||
|             (unsigned char*)rop + |  | ||||||
|                                (((order == -1) ? i : ((count - 1) - i)) * size) + |                                (((order == -1) ? i : ((count - 1) - i)) * size) + | ||||||
|             ((endian == -1) ? j : ((size - 1) - j)) |                                ((endian == -1) ? j : ((size - 1) - j)); | ||||||
|          ); |  | ||||||
| 
 | 
 | ||||||
|          if (j >= (size - nail_bytes)) { |          if (j >= (size - nail_bytes)) { | ||||||
|             *byte = 0; |             *byte = 0; | ||||||
|  | |||||||
| @ -45,14 +45,11 @@ int mp_import(mp_int* rop, size_t count, int order, size_t size, | |||||||
| 
 | 
 | ||||||
|    for (i = 0; i < count; ++i) { |    for (i = 0; i < count; ++i) { | ||||||
|       for (j = 0; j < (size - nail_bytes); ++j) { |       for (j = 0; j < (size - nail_bytes); ++j) { | ||||||
|          unsigned char byte = *( |          unsigned char byte = *((unsigned char *)op + | ||||||
|                (unsigned char*)op + |  | ||||||
|                                 (((order == 1) ? i : ((count - 1) - i)) * size) + |                                 (((order == 1) ? i : ((count - 1) - i)) * size) + | ||||||
|                ((endian == 1) ? (j + nail_bytes) : (((size - 1) - j) - nail_bytes)) |                                 ((endian == 1) ? (j + nail_bytes) : (((size - 1) - j) - nail_bytes))); | ||||||
|             ); |  | ||||||
| 
 | 
 | ||||||
|          if ( |          if ((result = mp_mul_2d(rop, ((j == 0) ? (8 - odd_nails) : 8), rop)) != MP_OKAY) { | ||||||
|             (result = mp_mul_2d(rop, ((j == 0) ? (8 - odd_nails) : 8), rop)) != MP_OKAY) { |  | ||||||
|             return result; |             return result; | ||||||
|          } |          } | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user