Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
parsing.h
Go to the documentation of this file.
1/*
2 * Copyright 2015-2018 Yubico AB
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef YUBICOM_PARSING_H
18#define YUBICOM_PARSING_H
19
20#include <stdbool.h>
21#include <stdlib.h>
22
23// NOTE(adma): those utility functions do not link against libyubihsm
24
25#define READ_STR_PROMPT_BASE "Enter %s: "
26#ifndef __WIN32
27#define YH_INTERNAL __attribute__((visibility("hidden")))
28#else
29#define YH_INTERNAL
30#endif
31
32bool YH_INTERNAL parse_pw(const char *prompt, char *pw, char *parsed,
33 size_t *parsed_len);
34bool YH_INTERNAL read_string(const char *name, char *str_buf,
35 size_t str_buf_len, bool hidden);
36
37#endif
std::string name
bool YH_INTERNAL parse_pw(const char *prompt, char *pw, char *parsed, size_t *parsed_len)
Definition parsing.c:61
#define YH_INTERNAL
Definition parsing.h:27
bool YH_INTERNAL read_string(const char *name, char *str_buf, size_t str_buf_len, bool hidden)
Definition parsing.c:26