Codebase list libcryptx-perl / upstream/0.074+git20211106.1.e1b50ee src / ltc / pk / ecc / ecc_get_size.c
upstream/0.074+git20211106.1.e1b50ee

Tree @upstream/0.074+git20211106.1.e1b50ee (Download .tar.gz)

ecc_get_size.c @upstream/0.074+git20211106.1.e1b50eeraw · history · blame

/* LibTomCrypt, modular cryptographic library -- Tom St Denis */
/* SPDX-License-Identifier: Unlicense */

#include "tomcrypt_private.h"

/**
  @file ecc_get_size.c
  ECC Crypto, Tom St Denis
*/

#ifdef LTC_MECC

/**
  Get the size of an ECC key
  @param key    The key to get the size of
  @return The size (octets) of the key or INT_MAX on error
*/
int ecc_get_size(const ecc_key *key)
{
   if (key == NULL) {
      return INT_MAX;
   }
   return key->dp.size;
}

#endif