comparison libtomcrypt/src/pk/pkcs1/pkcs_1_os2ip.c @ 511:582cb38e4eb5 insecure-nocrypto

propagate from branch 'au.asn.ucc.matt.dropbear' (head cdcc3c729e29544e8b98a408e2dc60e4483dfd2a) to branch 'au.asn.ucc.matt.dropbear.insecure-nocrypto' (head 0ca38a1cf349f7426ac9de34ebe4c3e3735effab)
author Matt Johnston <matt@ucc.asn.au>
date Thu, 06 Nov 2008 13:16:55 +0000
parents 0cbe8f6dbf9e
children f849a5ca2efc
comparison
equal deleted inserted replaced
361:461c4b1fb35f 511:582cb38e4eb5
4 * algorithms in a highly modular and flexible manner. 4 * algorithms in a highly modular and flexible manner.
5 * 5 *
6 * The library is free for all purposes without any express 6 * The library is free for all purposes without any express
7 * guarantee it works. 7 * guarantee it works.
8 * 8 *
9 * Tom St Denis, [email protected], http://libtomcrypt.org 9 * Tom St Denis, [email protected], http://libtomcrypt.com
10 */ 10 */
11 #include "tomcrypt.h" 11 #include "tomcrypt.h"
12 12
13 /** 13 /**
14 @file pkcs_1_os2ip.c 14 @file pkcs_1_os2ip.c
21 @param n [out] The mp_int destination 21 @param n [out] The mp_int destination
22 @param in The binary string to read 22 @param in The binary string to read
23 @param inlen The length of the binary string 23 @param inlen The length of the binary string
24 @return CRYPT_OK if successful 24 @return CRYPT_OK if successful
25 */ 25 */
26 int pkcs_1_os2ip(mp_int *n, unsigned char *in, unsigned long inlen) 26 int pkcs_1_os2ip(void *n, unsigned char *in, unsigned long inlen)
27 { 27 {
28 int err; 28 return mp_read_unsigned_bin(n, in, inlen);
29 /* read it */
30 if ((err = mp_read_unsigned_bin(n, in, inlen)) != MP_OKAY) {
31 return mpi_to_ltc_error(err);
32 }
33 return CRYPT_OK;
34 } 29 }
35 30
36 #endif /* PKCS_1 */ 31 #endif /* PKCS_1 */
37 32
38 33
39 /* $Source: /cvs/libtom/libtomcrypt/src/pk/pkcs1/pkcs_1_os2ip.c,v $ */ 34 /* $Source: /cvs/libtom/libtomcrypt/src/pk/pkcs1/pkcs_1_os2ip.c,v $ */
40 /* $Revision: 1.3 $ */ 35 /* $Revision: 1.5 $ */
41 /* $Date: 2005/05/05 14:35:59 $ */ 36 /* $Date: 2006/03/31 14:15:35 $ */