Void Sentry
An AI-driven, real-time Sentry Turret platform leveraging asynchronous I/O and computer vision to deliver high-precision autonomous motion tracking on resource-constrained embedded hardware.
Loading...
Searching...
No Matches
form.h
Go to the documentation of this file.
1
6#pragma once
7
8#include <cstddef>
9#include <string_view>
10
11namespace prov
12{
13constexpr size_t kMaxFormBody = 256;
14
21bool form_field(std::string_view body, std::string_view key, char* out, size_t out_cap, size_t* out_len);
24bool form_has_key(std::string_view body, std::string_view key);
26bool valid_ssid(std::string_view s);
28bool valid_password(std::string_view s);
30bool valid_pin(std::string_view s);
31} // namespace prov
bool form_has_key(std::string_view body, std::string_view key)
True if the body contains key= (even with an empty or malformed value). Lets callers tell missing fro...
Definition form.cpp:90
bool form_field(std::string_view body, std::string_view key, char *out, size_t out_cap, size_t *out_len)
Finds key=value in an x-www-form-urlencoded body, decodes XX and '+', writes value + NUL.
Definition form.cpp:64
bool valid_pin(std::string_view s)
PIN: 4-8 ASCII digits.
Definition form.cpp:138
bool valid_password(std::string_view s)
Password: empty, or 8-63 bytes of printable ASCII (32-126).
Definition form.cpp:117
bool valid_ssid(std::string_view s)
SSID: 1-32 bytes.
Definition form.cpp:115