2 * Copyright (c) 2022 Yubico AB. All rights reserved.
3 * Use of this source code is governed by a BSD-style
4 * license that can be found in the LICENSE file.
5 * SPDX-License-Identifier: BSD-2-Clause
15 fido_to_uint64(const char *str, int base, uint64_t *out)
18 unsigned long long ull;
21 ull = strtoull(str, &ep, base);
22 if (str == ep || *ep != '\0')
24 else if (ull == ULLONG_MAX && errno == ERANGE)
26 else if (ull > UINT64_MAX)