Ruby  3.1.0dev(2021-09-10revisionb76ad15ed0da636161de0243c547ee1e6fc95681)
Macros | Functions | Variables
ossl_hmac.c File Reference

(b76ad15ed0da636161de0243c547ee1e6fc95681)

#include "ossl.h"
Include dependency graph for ossl_hmac.c:

Go to the source code of this file.

Macros

#define NewHMAC(klass)   TypedData_Wrap_Struct((klass), &ossl_hmac_type, 0)
 
#define GetHMAC(obj, ctx)
 

Functions

void Init_ossl_hmac (void)
 

Variables

VALUE cHMAC
 
VALUE eHMACError
 

Macro Definition Documentation

◆ GetHMAC

#define GetHMAC (   obj,
  ctx 
)
Value:
do { \
TypedData_Get_Struct((obj), EVP_MD_CTX, &ossl_hmac_type, (ctx)); \
if (!(ctx)) { \
ossl_raise(rb_eRuntimeError, "HMAC wasn't initialized"); \
} \
} while (0)

Definition at line 14 of file ossl_hmac.c.

◆ NewHMAC

#define NewHMAC (   klass)    TypedData_Wrap_Struct((klass), &ossl_hmac_type, 0)

Definition at line 12 of file ossl_hmac.c.

Function Documentation

◆ Init_ossl_hmac()

void Init_ossl_hmac ( void  )

Variable Documentation

◆ cHMAC

VALUE cHMAC

Definition at line 24 of file ossl_hmac.c.

Referenced by Init_ossl_hmac().

◆ eHMACError

VALUE eHMACError

Definition at line 25 of file ossl_hmac.c.

Referenced by Init_ossl_hmac().

rb_eRuntimeError
VALUE rb_eRuntimeError
Definition: error.c:1091