Ruby: ext/openssl/ossl_hmac.c File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

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)
rb_eRuntimeError
VALUE rb_eRuntimeError
Definition: error.c:1055

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 327 of file ossl_hmac.c.

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

Referenced by Init_openssl().

## 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().