#include "ossl.h"
Go to the source code of this file.
Defines | |
#define | GetDigest(obj, ctx) |
#define | SafeGetDigest(obj, ctx) |
Functions | |
static VALUE | ossl_digest_alloc (VALUE klass) |
const EVP_MD * | GetDigestPtr (VALUE obj) |
VALUE | ossl_digest_new (const EVP_MD *md) |
VALUE | ossl_digest_update (VALUE, VALUE) |
static VALUE | ossl_digest_initialize (int argc, VALUE *argv, VALUE self) |
static VALUE | ossl_digest_copy (VALUE self, VALUE other) |
static VALUE | ossl_digest_reset (VALUE self) |
static VALUE | ossl_digest_finish (int argc, VALUE *argv, VALUE self) |
static VALUE | ossl_digest_name (VALUE self) |
static VALUE | ossl_digest_size (VALUE self) |
static VALUE | ossl_digest_block_length (VALUE self) |
void | Init_ossl_digest () |
Variables | |
VALUE | cDigest |
VALUE | eDigestError |
#define GetDigest | ( | obj, | ||
ctx | ||||
) |
do { \ Data_Get_Struct(obj, EVP_MD_CTX, ctx); \ if (!ctx) { \ ossl_raise(rb_eRuntimeError, "Digest CTX wasn't initialized!"); \ } \ } while (0)
Definition at line 13 of file ossl_digest.c.
Referenced by ossl_digest_block_length(), ossl_digest_copy(), ossl_digest_finish(), ossl_digest_initialize(), ossl_digest_name(), ossl_digest_new(), ossl_digest_reset(), ossl_digest_size(), and ossl_digest_update().
#define SafeGetDigest | ( | obj, | ||
ctx | ||||
) |
do { \ OSSL_Check_Kind(obj, cDigest); \ GetDigest(obj, ctx); \ } while (0)
Definition at line 19 of file ossl_digest.c.
Referenced by GetDigestPtr(), and ossl_digest_copy().
const EVP_MD* GetDigestPtr | ( | VALUE | obj | ) |
Definition at line 36 of file ossl_digest.c.
References name, ossl_raise(), rb_eRuntimeError, SafeGetDigest, StringValueCStr, T_STRING, and TYPE.
Referenced by ossl_cipher_pkcs5_keyivgen(), ossl_digest_initialize(), ossl_hmac_initialize(), ossl_hmac_s_digest(), ossl_hmac_s_hexdigest(), ossl_pkcs7si_initialize(), ossl_pkey_sign(), ossl_pkey_verify(), ossl_spki_sign(), ossl_x509_sign(), ossl_x509crl_sign(), and ossl_x509req_sign().
void Init_ossl_digest | ( | void | ) |
Definition at line 234 of file ossl_digest.c.
References cDigest, eDigestError, eOSSLError, mOSSL, ossl_digest_alloc(), ossl_digest_block_length(), ossl_digest_copy(), ossl_digest_finish(), ossl_digest_initialize(), ossl_digest_name(), ossl_digest_reset(), ossl_digest_size(), ossl_digest_update(), rb_define_alias(), rb_define_alloc_func(), rb_define_class_under(), rb_define_copy_func, rb_define_method(), rb_define_module(), rb_define_private_method(), rb_path2class(), and rb_require().
Referenced by Init_openssl().
Definition at line 74 of file ossl_digest.c.
References Data_Wrap_Struct, EVP_MD_CTX_create(), EVP_MD_CTX_destroy(), NULL, ossl_raise(), and rb_eRuntimeError.
Referenced by Init_ossl_digest(), and ossl_digest_new().
Definition at line 221 of file ossl_digest.c.
References GetDigest, and INT2NUM().
Referenced by Init_ossl_digest().
Definition at line 113 of file ossl_digest.c.
References eDigestError, GetDigest, NULL, ossl_raise(), rb_check_frozen(), and SafeGetDigest.
Referenced by Init_ossl_digest().
Definition at line 168 of file ossl_digest.c.
References EVP_DigestFinal_ex, GetDigest, NIL_P, NULL, rb_scan_args(), rb_str_new(), rb_str_resize(), RSTRING_PTR, and StringValue.
Referenced by Init_ossl_digest().
Definition at line 95 of file ossl_digest.c.
References EVP_DigestInit_ex, GetDigest, GetDigestPtr(), NIL_P, NULL, ossl_digest_update(), rb_scan_args(), StringValue, and type.
Referenced by Init_ossl_digest().
Definition at line 195 of file ossl_digest.c.
References EVP_MD_name, GetDigest, and rb_str_new2().
Referenced by Init_ossl_digest().
VALUE ossl_digest_new | ( | const EVP_MD * | md | ) |
Definition at line 58 of file ossl_digest.c.
References cDigest, EVP_DigestInit_ex, GetDigest, NULL, and ossl_digest_alloc().
Definition at line 135 of file ossl_digest.c.
References EVP_DigestInit_ex, GetDigest, and NULL.
Referenced by Init_ossl_digest().
Definition at line 211 of file ossl_digest.c.
References GetDigest, and INT2NUM().
Referenced by Init_ossl_digest().
Definition at line 151 of file ossl_digest.c.
References GetDigest, RSTRING_LEN, RSTRING_PTR, and StringValue.
Referenced by Init_ossl_digest(), and ossl_digest_initialize().
Definition at line 27 of file ossl_digest.c.
Referenced by Init_ossl_digest(), and ossl_digest_new().
Definition at line 28 of file ossl_digest.c.
Referenced by Init_ossl_digest(), and ossl_digest_copy().