Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions README-RU.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,11 @@ string hash = hmac::get_hmac("key", "message", hmac::TypeHash::SHA256);

```cpp
std::string get_hmac(
std::string key,
const std::string& key,
const std::string& msg,
const TypeHash type,
TypeHash type,
bool is_hex = true,
bool is_upper = false
);
bool is_upper = false);
```

Параметры:
Expand All @@ -100,7 +99,7 @@ std::string get_hmac(

Возвращает:
Если `is_hex == true`, возвращает HMAC в виде hex-строки (`std::string`).
Если `is_hex == false`, возвращает HMAC в виде бинарной строки (`std::string`, не предназначена для вывода).
Если `is_hex == false`, возвращает бинарную строку; для бинарного вывода предпочтительнее перегрузка со `std::vector<uint8_t>`.

#### Безопасная работа со строковыми ключами

Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,11 @@ string hash = hmac::get_hmac("key", "message", hmac::TypeHash::SHA256);

```cpp
std::string get_hmac(
std::string key,
const std::string& key,
const std::string& msg,
const TypeHash type,
TypeHash type,
bool is_hex = true,
bool is_upper = false
);
bool is_upper = false);
```

Parameters:
Expand All @@ -128,7 +127,7 @@ Parameters:

Returns:
If `is_hex == true`, returns a hexadecimal string (`std::string`) of the HMAC.
If `is_hex == false`, returns a raw binary HMAC as a `std::string` (not human-readable).
If `is_hex == false`, returns a raw binary string; for binary output, prefer the `std::vector<uint8_t>` overload.

#### Secure handling of string keys

Expand Down
Loading