Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

Macros | Functions | Variables
ossl_hmac.c File Reference
`#include "ossl.h"`

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), HMAC_CTX, &ossl_hmac_type, (ctx)); \
if (!(ctx)) { \
ossl_raise(rb_eRuntimeError, "HMAC wasn't initialized"); \
} \
} while (0)

Definition at line 16 of file ossl_hmac.c.

## ◆ NewHMAC

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

Definition at line 14 of file ossl_hmac.c.

## Function Documentation

## ◆ Init_ossl_hmac()

void Init_ossl_hmac | ( | void |  | ) |

Definition at line 333 of file ossl_hmac.c.

References cHMAC, eHMACError, eOSSLError, mOSSL, rb_cObject, rb_define_alloc_func(), rb_define_class_under(), rb_define_module(), and rb_eStandardError.

## Variable Documentation

## ◆ cHMAC

VALUE cHMAC

Definition at line 26 of file ossl_hmac.c.

Referenced by Init_ossl_hmac().

## ◆ eHMACError

VALUE eHMACError

Definition at line 27 of file ossl_hmac.c.

Referenced by Init_ossl_hmac().

obj
const VALUE VALUE obj
Definition: rb_mjit_min_header-2.7.0.h:5742
rb_eRuntimeError
VALUE rb_eRuntimeError
Definition: error.c:920