OQS_STATUS enum

Represents return values from functions.

Functions declared to return OQS_STATUS must return one of the values below. Algorithm implementations imported into liboqs must return OQS_SUCCESS on success and OQS_ERROR for generic failures. Implementations with their own status codes must translate them in the upstream integration layer before exposing the function to liboqs.

Callers should compare with the symbol rather than the individual value. For example,

ret = OQS_KEM_encaps(...); if (ret == OQS_SUCCESS) { ... }

rather than

if (!OQS_KEM_encaps(...) { ... }

Inheritance
Available extensions

Values

OQS_ERROR → const OQS_STATUS

Used to indicate that some undefined error occurred.

const OQS_STATUS(-1)
OQS_SUCCESS → const OQS_STATUS

Used to indicate successful return from function.

const OQS_STATUS(0)
OQS_EXTERNAL_LIB_ERROR_OPENSSL → const OQS_STATUS

Used to indicate failures in external libraries (e.g., OpenSSL).

const OQS_STATUS(50)

Properties

hashCode → int
The hash code for this object.
no setterinherited
index → int
A numeric identifier for the enumerated value.
no setterinherited
name → String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
value → int
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fromValue(int value) → OQS_STATUS

Constants

values → const List<OQS_STATUS>
A constant List of the values in this enum, in order of their declaration.