Ruby  2.5.0dev(2017-10-22revision60238)
Macros | Functions | Variables
ossl_digest.c File Reference
#include "ossl.h"

Go to the source code of this file.

Macros

#define GetDigest(obj, ctx)
 

Functions

const EVP_MD * ossl_evp_get_digestbyname (VALUE obj)
 
VALUE ossl_digest_new (const EVP_MD *md)
 
VALUE ossl_digest_update (VALUE, VALUE)
 
void Init_ossl_digest (void)
 

Variables

VALUE cDigest
 
VALUE eDigestError
 

Macro Definition Documentation

◆ GetDigest

#define GetDigest (   obj,
  ctx 
)
Value:
do { \
TypedData_Get_Struct((obj), EVP_MD_CTX, &ossl_digest_type, (ctx)); \
if (!(ctx)) { \
ossl_raise(rb_eRuntimeError, "Digest CTX wasn't initialized!"); \
} \
} while (0)
VALUE rb_eRuntimeError
Definition: error.c:800

Definition at line 12 of file ossl_digest.c.

Referenced by ossl_digest_update(), and ossl_evp_get_digestbyname().

Function Documentation

◆ Init_ossl_digest()

void Init_ossl_digest ( void  )

◆ ossl_digest_new()

VALUE ossl_digest_new ( const EVP_MD *  md)

Definition at line 73 of file ossl_digest.c.

◆ ossl_digest_update()

VALUE ossl_digest_update ( VALUE  self,
VALUE  data 
)

Definition at line 202 of file ossl_digest.c.

References eDigestError, GetDigest, ossl_raise(), RSTRING_LEN, RSTRING_PTR, and StringValue.

◆ ossl_evp_get_digestbyname()

const EVP_MD* ossl_evp_get_digestbyname ( VALUE  obj)

Variable Documentation

◆ cDigest

VALUE cDigest

Definition at line 22 of file ossl_digest.c.

Referenced by Init_ossl_digest().

◆ eDigestError

VALUE eDigestError

Definition at line 23 of file ossl_digest.c.

Referenced by Init_ossl_digest(), and ossl_digest_update().