Ruby
2.4.2p198(2017-09-14revision59899)
|
#include "ossl.h"
Go to the source code of this file.
Macros | |
#define | NewCipher(klass) TypedData_Wrap_Struct((klass), &ossl_cipher_type, 0) |
#define | AllocCipher(obj, ctx) |
#define | GetCipherInit(obj, ctx) |
#define | GetCipher(obj, ctx) |
#define | SafeGetCipher(obj, ctx) |
#define | ossl_cipher_set_auth_data rb_f_notimplement |
#define | ossl_cipher_get_auth_tag rb_f_notimplement |
#define | ossl_cipher_set_auth_tag rb_f_notimplement |
#define | ossl_cipher_set_auth_tag_len rb_f_notimplement |
#define | ossl_cipher_set_iv_length rb_f_notimplement |
Variables | |
VALUE | cCipher |
VALUE | eCipherError |
static ID | id_auth_tag_len |
static ID | id_key_set |
static const rb_data_type_t | ossl_cipher_type |
#define AllocCipher | ( | obj, | |
ctx | |||
) |
Definition at line 14 of file ossl_cipher.c.
Referenced by ossl_cipher_copy(), ossl_cipher_initialize(), and ossl_cipher_new().
#define GetCipher | ( | obj, | |
ctx | |||
) |
Definition at line 23 of file ossl_cipher.c.
Referenced by GetCipherPtr(), ossl_cipher_block_size(), ossl_cipher_final(), ossl_cipher_init(), ossl_cipher_is_authenticated(), ossl_cipher_iv_length(), ossl_cipher_key_length(), ossl_cipher_name(), ossl_cipher_pkcs5_keyivgen(), ossl_cipher_reset(), ossl_cipher_set_iv(), ossl_cipher_set_key(), ossl_cipher_set_key_length(), ossl_cipher_set_padding(), and ossl_cipher_update().
#define GetCipherInit | ( | obj, | |
ctx | |||
) |
Definition at line 20 of file ossl_cipher.c.
Referenced by ossl_cipher_copy(), and ossl_cipher_initialize().
#define NewCipher | ( | klass | ) | TypedData_Wrap_Struct((klass), &ossl_cipher_type, 0) |
Definition at line 12 of file ossl_cipher.c.
Referenced by ossl_cipher_alloc().
#define ossl_cipher_get_auth_tag rb_f_notimplement |
Definition at line 727 of file ossl_cipher.c.
Referenced by Init_ossl_cipher(), and ossl_cipher_is_authenticated().
#define ossl_cipher_set_auth_data rb_f_notimplement |
Definition at line 726 of file ossl_cipher.c.
Referenced by Init_ossl_cipher(), and ossl_cipher_is_authenticated().
#define ossl_cipher_set_auth_tag rb_f_notimplement |
Definition at line 728 of file ossl_cipher.c.
Referenced by Init_ossl_cipher(), and ossl_cipher_is_authenticated().
#define ossl_cipher_set_auth_tag_len rb_f_notimplement |
Definition at line 729 of file ossl_cipher.c.
Referenced by Init_ossl_cipher(), and ossl_cipher_is_authenticated().
#define ossl_cipher_set_iv_length rb_f_notimplement |
Definition at line 730 of file ossl_cipher.c.
Referenced by Init_ossl_cipher(), and ossl_cipher_is_authenticated().
#define SafeGetCipher | ( | obj, | |
ctx | |||
) |
Definition at line 29 of file ossl_cipher.c.
Referenced by ossl_cipher_copy().
Definition at line 157 of file ossl_cipher.c.
References NULL, rb_ary_push(), and rb_str_new2.
Referenced by ossl_s_ciphers().
Definition at line 56 of file ossl_cipher.c.
References cCipher, GetCipher, ossl_raise(), PRIsVALUE, rb_eArgError, rb_obj_is_kind_of(), RSTRING_PTR, and StringValueCStr.
Referenced by ossl_dsa_export(), ossl_pkcs7_s_encrypt(), ossl_pkcs7_set_cipher(), and ossl_rsa_export().
void Init_ossl_cipher | ( | void | ) |
Definition at line 839 of file ossl_cipher.c.
References cCipher, eCipherError, eOSSLError, id_auth_tag_len, id_key_set, mOSSL, ossl_cipher_alloc(), ossl_cipher_block_size(), ossl_cipher_copy(), ossl_cipher_decrypt(), ossl_cipher_encrypt(), ossl_cipher_final(), ossl_cipher_get_auth_tag, ossl_cipher_initialize(), ossl_cipher_is_authenticated(), ossl_cipher_iv_length(), ossl_cipher_key_length(), ossl_cipher_name(), ossl_cipher_pkcs5_keyivgen(), ossl_cipher_reset(), ossl_cipher_set_auth_data, ossl_cipher_set_auth_tag, ossl_cipher_set_auth_tag_len, ossl_cipher_set_iv(), ossl_cipher_set_iv_length, ossl_cipher_set_key(), ossl_cipher_set_key_length(), ossl_cipher_set_padding(), ossl_cipher_update(), ossl_s_ciphers(), rb_cObject, rb_define_alloc_func(), rb_define_class_under(), rb_define_copy_func, rb_define_method(), rb_define_module(), rb_define_module_function(), rb_eStandardError, and rb_intern_const.
Referenced by Init_openssl().
Definition at line 102 of file ossl_cipher.c.
References NewCipher.
Referenced by Init_ossl_cipher(), and ossl_cipher_new().
Definition at line 826 of file ossl_cipher.c.
References GetCipher, and INT2NUM.
Referenced by Init_ossl_cipher().
Definition at line 138 of file ossl_cipher.c.
References AllocCipher, eCipherError, EVP_CIPHER_CTX_copy, GetCipherInit, NULL, ossl_raise(), rb_check_frozen, and SafeGetCipher.
Referenced by Init_ossl_cipher().
Definition at line 281 of file ossl_cipher.c.
References ossl_cipher_init().
Referenced by Init_ossl_cipher().
Definition at line 263 of file ossl_cipher.c.
References ossl_cipher_init().
Referenced by Init_ossl_cipher().
Definition at line 429 of file ossl_cipher.c.
References assert, eCipherError, GetCipher, NULL, ossl_raise(), rb_str_new(), rb_str_set_len(), RSTRING_LEN, and RSTRING_PTR.
Referenced by Init_ossl_cipher().
|
static |
Definition at line 96 of file ossl_cipher.c.
References EVP_CIPHER_CTX_free.
Definition at line 204 of file ossl_cipher.c.
References eCipherError, GetCipher, id_key_set, key, memcpy, NIL_P, NULL, ossl_raise(), PRIsVALUE, Qtrue, rb_class_path(), rb_ivar_set(), rb_obj_class(), rb_scan_args(), rb_warn(), RSTRING_LEN, RSTRING_LENINT, RSTRING_PTR, and StringValue.
Referenced by ossl_cipher_decrypt(), and ossl_cipher_encrypt().
Definition at line 116 of file ossl_cipher.c.
References AllocCipher, eCipherError, GetCipherInit, name, NULL, ossl_raise(), PRIsVALUE, rb_eRuntimeError, and StringValueCStr.
Referenced by Init_ossl_cipher().
Definition at line 538 of file ossl_cipher.c.
References argc, argv, eCipherError, GetCipher, id_auth_tag_len, INT2NUM, len, NIL_P, NULL, NUM2INT, ossl_cipher_get_auth_tag, ossl_cipher_set_auth_data, ossl_cipher_set_auth_tag, ossl_cipher_set_auth_tag_len, ossl_cipher_set_iv_length, ossl_cipher_update_long(), ossl_raise(), Qfalse, Qtrue, rb_attr_get(), rb_ivar_set(), rb_scan_args(), rb_str_new(), RSTRING_LEN, RSTRING_LENINT, RSTRING_PTR, and StringValue.
Referenced by Init_ossl_cipher().
Definition at line 803 of file ossl_cipher.c.
References GetCipher, INT2NUM, and len.
Referenced by Init_ossl_cipher().
Definition at line 787 of file ossl_cipher.c.
References GetCipher, and INT2NUM.
Referenced by Init_ossl_cipher().
Definition at line 453 of file ossl_cipher.c.
References GetCipher, and rb_str_new2.
Referenced by Init_ossl_cipher().
Definition at line 79 of file ossl_cipher.c.
References AllocCipher, cCipher, eCipherError, NULL, ossl_cipher_alloc(), and ossl_raise().
Referenced by ossl_engine_get_cipher().
Definition at line 307 of file ossl_cipher.c.
References eCipherError, GetCipher, GetDigestPtr(), id_key_set, key, NIL_P, NULL, NUM2INT, ossl_raise(), Qnil, Qtrue, rb_ivar_set(), rb_scan_args(), RSTRING_LEN, RSTRING_LENINT, RSTRING_PTR, and StringValue.
Referenced by Init_ossl_cipher().
Definition at line 192 of file ossl_cipher.c.
References eCipherError, GetCipher, NULL, and ossl_raise().
Referenced by Init_ossl_cipher().
Definition at line 507 of file ossl_cipher.c.
References eCipherError, GetCipher, NULL, ossl_raise(), rb_eArgError, RSTRING_LEN, RSTRING_PTR, and StringValue.
Referenced by Init_ossl_cipher().
Definition at line 474 of file ossl_cipher.c.
References eCipherError, GetCipher, id_key_set, key, NULL, ossl_raise(), Qtrue, rb_eArgError, rb_ivar_set(), RSTRING_LEN, RSTRING_PTR, and StringValue.
Referenced by Init_ossl_cipher().
Definition at line 746 of file ossl_cipher.c.
References eCipherError, GetCipher, len, NULL, NUM2INT, and ossl_raise().
Referenced by Init_ossl_cipher().
Definition at line 769 of file ossl_cipher.c.
References eCipherError, GetCipher, NULL, NUM2INT, and ossl_raise().
Referenced by Init_ossl_cipher().
Definition at line 376 of file ossl_cipher.c.
References assert, eCipherError, GetCipher, id_key_set, NIL_P, NULL, ossl_cipher_update_long(), ossl_raise(), rb_attr_get(), rb_eArgError, rb_eRangeError, rb_scan_args(), rb_str_new(), rb_str_resize(), rb_str_set_len(), RSTRING_LEN, RSTRING_PTR, RTEST, and StringValue.
Referenced by Init_ossl_cipher().
|
static |
Definition at line 339 of file ossl_cipher.c.
Referenced by ossl_cipher_is_authenticated(), and ossl_cipher_update().
Definition at line 170 of file ossl_cipher.c.
References add_cipher_name_to_ary(), and rb_ary_new().
Referenced by Init_ossl_cipher().
VALUE cCipher |
Definition at line 37 of file ossl_cipher.c.
Referenced by GetCipherPtr(), Init_ossl_cipher(), and ossl_cipher_new().
VALUE eCipherError |
Definition at line 38 of file ossl_cipher.c.
Referenced by Init_ossl_cipher(), ossl_cipher_copy(), ossl_cipher_final(), ossl_cipher_init(), ossl_cipher_initialize(), ossl_cipher_is_authenticated(), ossl_cipher_new(), ossl_cipher_pkcs5_keyivgen(), ossl_cipher_reset(), ossl_cipher_set_iv(), ossl_cipher_set_key(), ossl_cipher_set_key_length(), ossl_cipher_set_padding(), and ossl_cipher_update().
|
static |
Definition at line 39 of file ossl_cipher.c.
Referenced by Init_ossl_cipher(), and ossl_cipher_is_authenticated().
|
static |
Definition at line 39 of file ossl_cipher.c.
Referenced by Init_ossl_cipher(), ossl_cipher_init(), ossl_cipher_pkcs5_keyivgen(), ossl_cipher_set_key(), and ossl_cipher_update().
|
static |
Definition at line 44 of file ossl_cipher.c.