S2OPC OPCUA Toolkit
Loading...
Searching...
No Matches
sopc_askpass.h
Go to the documentation of this file.
1/*
2 * Licensed to Systerel under one or more contributor license
3 * agreements. See the NOTICE file distributed with this work
4 * for additional information regarding copyright ownership.
5 * Systerel licenses this file to you under the Apache
6 * License, Version 2.0 (the "License"); you may not use this
7 * file except in compliance with the License. You may obtain
8 * a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
27#ifndef SOPC_ASKPASS_H_
28#define SOPC_ASKPASS_H_
29
30#include <stdbool.h>
31
32// Maximum password length
33#ifndef SOPC_PASSWORD_MAX_LENGTH
34#define SOPC_PASSWORD_MAX_LENGTH 128
35#endif
36
53bool SOPC_AskPass_FromTerminal(char** outPassword);
54
65bool SOPC_AskPass_CustomPromptFromTerminal(const char* prompt, char** outPassword);
66
67#endif /* SOPC_ASKPASS_H_ */
bool SOPC_AskPass_FromTerminal(char **outPassword)
Ask for a password in an interactive and secure way from a console. The prompt is "Password:\n".
bool SOPC_AskPass_CustomPromptFromTerminal(const char *prompt, char **outPassword)
Ask for a password in an interactive and secure way from a console. Same as SOPC_AskPass_FromTerminal...