| 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_identifier.c |
| 7 | ASN.1 DER, determine the length when encoding the ASN.1 Identifier, Steffen Jaeckel |
| 8 | */ |
| 9 | |
| 10 | #ifdef LTC_DER |
| 11 | /** |
| 12 | Determine the length required when encoding the ASN.1 Identifier |
| 13 | @param id The ASN.1 identifier to encode |
| 14 | @param idlen [out] The required length to encode list |
| 15 | @return CRYPT_OK if successful |
| 16 | */ |
| 17 | |
| 18 | int der_length_asn1_identifier(const ltc_asn1_list *id, unsigned long *idlen) |
| 19 | { |
| 20 | return der_encode_asn1_identifier(id, NULL, idlen); |
| 21 | } |
| 22 | |
| 23 | #endif |