Skip to content

Commit

Permalink
Version 0.12.0
Browse files Browse the repository at this point in the history
Signed-off-by: Vlad Gheorghiu <[email protected]>
  • Loading branch information
vsoftco committed Jan 14, 2025
1 parent 377b54d commit eb55cbc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ C library, which is a C library for quantum-resistant cryptographic algorithms.

The wrapper is written in standard C++11, hence in the following it is assumed
that you have access to a C++11 compliant compiler. liboqs-cpp has been
extensively tested on Linux, macOS and Windows platforms. Continuous integration
is provided via GitHub actions.
extensively tested on Linux, macOS, FreeBSD and Windows platforms. Continuous
integration is provided via GitHub actions.

The project contains the following files and directories:

Expand Down
8 changes: 8 additions & 0 deletions include/oqs_cpp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,10 @@ class Signature {
* \return Message signature
*/
bytes sign_with_ctx_str(const bytes& message, const bytes& context) const {
if (!context.empty() && !alg_details_.sig_with_ctx_support)
throw std::runtime_error(
"Signing with context string not supported");

if (secret_key_.size() != alg_details_.length_secret_key)
throw std::runtime_error(
"Incorrect secret key length, make sure you "
Expand Down Expand Up @@ -710,6 +714,10 @@ class Signature {
bool verify_with_ctx_str(const bytes& message, const bytes& signature,
const bytes& context,
const bytes& public_key) const {
if (!context.empty() && !alg_details_.sig_with_ctx_support)
throw std::runtime_error(
"Verifying with context string not supported");

if (public_key.size() != alg_details_.length_public_key)
throw std::runtime_error("Incorrect public key length");

Expand Down

0 comments on commit eb55cbc

Please sign in to comment.