Debian Codegraph @

src/ltc/pk/asn1/der/general/der_length_asn1_length.c

raw
1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis */
2 /* SPDX-License-Identifier: Unlicense */
3 #include "tomcrypt_private.h"
4
5 /**
6 @file der_length_asn1_length.c
7 ASN.1 DER, determine the length of the ASN.1 length field, Steffen Jaeckel
8 */
9
10 #ifdef LTC_DER
11 /**
12 Determine the length required to encode len in the ASN.1 length field
13 @param len The length to encode
14 @param outlen [out] The length that's required to store len
15 @return CRYPT_OK if successful
16 */
17 int der_length_asn1_length(unsigned long len, unsigned long *outlen)
18 {
19 return der_encode_asn1_length(len, NULL, outlen);
20 }
21
22 #endif