Sane C++ Libraries
C++ Platform Abstraction Libraries
Loading...
Searching...
No Matches
SC::Cryptography Struct Reference

Platform-backed symmetric cryptography primitives. More...

#include <Cryptography.h>

Classes

struct  Aead
 
struct  Cipher
 
struct  Features
 
struct  Hkdf
 
struct  Hmac
 
struct  MacResult
 
struct  Random
 

Public Types

enum class  Backend : uint8_t {
  Native ,
  OpenSSL
}
 Selects the provider used by a cryptographic session. More...
 
enum class  HashType : uint8_t {
  SHA256 ,
  SHA384
}
 
enum class  AeadType : uint8_t {
  AES128GCM ,
  AES256GCM
}
 
enum class  CipherType : uint8_t {
  AES128CBCPKCS7 ,
  AES256CBCPKCS7
}
 

Static Public Member Functions

static Result queryFeatures (Features &outFeatures)
 Query which primitives are available on the default native backend.
 
static Result queryFeatures (Backend backend, Features &outFeatures)
 Query which primitives are available on a specific backend.
 

Detailed Description

Platform-backed symmetric cryptography primitives.


The native backend uses operating system cryptographic primitives and keeps the core interface synchronous, allocation-free and span-based. Linux can explicitly select a runtime-loaded OpenSSL 3 backend, whose internal allocations are outside the library's control. Apple GCM is narrowly composed over CommonCrypto AES.

Warning
This is a Draft, unaudited low-level primitive API. Prefer AEAD, keep keys and nonces under an explicit protocol policy, and use AES-CBC only for compatibility with an existing authenticated construction.

Member Enumeration Documentation

◆ Backend

enum class SC::Cryptography::Backend : uint8_t
strong

Selects the provider used by a cryptographic session.

Member Function Documentation

◆ queryFeatures() [1/2]

static Result SC::Cryptography::queryFeatures ( Backend backend,
Features & outFeatures )
static

Query which primitives are available on a specific backend.

◆ queryFeatures() [2/2]

static Result SC::Cryptography::queryFeatures ( Features & outFeatures)
static

Query which primitives are available on the default native backend.


The documentation for this struct was generated from the following file: