Ruby
2.0.0p648(2015-12-16revision53162)
|
#include "ossl.h"
Go to the source code of this file.
Macros | |
#define | WrapCipher(obj, klass, ctx) (obj) = Data_Wrap_Struct((klass), 0, ossl_cipher_free, (ctx)) |
#define | MakeCipher(obj, klass, ctx) (obj) = Data_Make_Struct((klass), EVP_CIPHER_CTX, 0, ossl_cipher_free, (ctx)) |
#define | AllocCipher(obj, ctx) memset(DATA_PTR(obj) = (ctx) = ALLOC(EVP_CIPHER_CTX), 0, sizeof(EVP_CIPHER_CTX)) |
#define | GetCipherInit(obj, ctx) |
#define | GetCipher(obj, ctx) |
#define | SafeGetCipher(obj, ctx) |
#define | ossl_s_ciphers rb_f_notimplement |
#define | UPDATE_LENGTH_LIMIT INT_MAX |
#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_is_authenticated rb_f_notimplement |
#define | ossl_cipher_set_padding rb_f_notimplement |
#define | CIPHER_0ARG_INT(func) |
Variables | |
VALUE | cCipher |
VALUE | eCipherError |
static ID | id_key_set |
#define AllocCipher | ( | obj, | |
ctx | |||
) | memset(DATA_PTR(obj) = (ctx) = ALLOC(EVP_CIPHER_CTX), 0, sizeof(EVP_CIPHER_CTX)) |
Definition at line 17 of file ossl_cipher.c.
Referenced by ossl_cipher_copy(), ossl_cipher_initialize(), and ossl_cipher_new().
#define CIPHER_0ARG_INT | ( | func | ) |
Definition at line 735 of file ossl_cipher.c.
#define GetCipher | ( | obj, | |
ctx | |||
) |
Definition at line 22 of file ossl_cipher.c.
Referenced by ossl_cipher_final(), ossl_cipher_init(), ossl_cipher_name(), ossl_cipher_pkcs5_keyivgen(), ossl_cipher_reset(), ossl_cipher_set_iv(), ossl_cipher_set_key(), ossl_cipher_set_key_length(), and ossl_cipher_update().
#define GetCipherInit | ( | obj, | |
ctx | |||
) |
Definition at line 19 of file ossl_cipher.c.
Referenced by ossl_cipher_copy(), and ossl_cipher_initialize().
#define MakeCipher | ( | obj, | |
klass, | |||
ctx | |||
) | (obj) = Data_Make_Struct((klass), EVP_CIPHER_CTX, 0, ossl_cipher_free, (ctx)) |
Definition at line 15 of file ossl_cipher.c.
#define ossl_cipher_get_auth_tag rb_f_notimplement |
Definition at line 679 of file ossl_cipher.c.
Referenced by Init_ossl_cipher().
#define ossl_cipher_is_authenticated rb_f_notimplement |
Definition at line 681 of file ossl_cipher.c.
Referenced by Init_ossl_cipher().
#define ossl_cipher_set_auth_data rb_f_notimplement |
Definition at line 678 of file ossl_cipher.c.
Referenced by Init_ossl_cipher().
#define ossl_cipher_set_auth_tag rb_f_notimplement |
Definition at line 680 of file ossl_cipher.c.
Referenced by Init_ossl_cipher().
#define ossl_cipher_set_padding rb_f_notimplement |
Definition at line 732 of file ossl_cipher.c.
Referenced by Init_ossl_cipher().
#define ossl_s_ciphers rb_f_notimplement |
Definition at line 171 of file ossl_cipher.c.
Referenced by Init_ossl_cipher().
#define SafeGetCipher | ( | obj, | |
ctx | |||
) |
Definition at line 28 of file ossl_cipher.c.
Referenced by GetCipherPtr(), and ossl_cipher_copy().
#define UPDATE_LENGTH_LIMIT INT_MAX |
Referenced by ossl_cipher_update_long().
#define WrapCipher | ( | obj, | |
klass, | |||
ctx | |||
) | (obj) = Data_Wrap_Struct((klass), 0, ossl_cipher_free, (ctx)) |
Definition at line 13 of file ossl_cipher.c.
Referenced by ossl_cipher_alloc().
Definition at line 46 of file ossl_cipher.c.
References SafeGetCipher.
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 770 of file ossl_cipher.c.
References cCipher, eCipherError, eOSSLError, id_key_set, mOSSL, ossl_cipher_alloc(), 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_name(), ossl_cipher_pkcs5_keyivgen(), ossl_cipher_reset(), ossl_cipher_set_auth_data, ossl_cipher_set_auth_tag, ossl_cipher_set_iv(), 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(), and rb_intern_const.
Referenced by Init_openssl().
Definition at line 83 of file ossl_cipher.c.
References WrapCipher.
Referenced by Init_ossl_cipher(), and ossl_cipher_new().
Definition at line 124 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 271 of file ossl_cipher.c.
References ossl_cipher_init().
Referenced by Init_ossl_cipher().
Definition at line 253 of file ossl_cipher.c.
References ossl_cipher_init().
Referenced by Init_ossl_cipher().
Definition at line 421 of file ossl_cipher.c.
References assert, eCipherError, EVP_CipherFinal_ex, 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 74 of file ossl_cipher.c.
References ruby_xfree().
Definition at line 196 of file ossl_cipher.c.
References eCipherError, EVP_CipherInit_ex, GetCipher, id_key_set, key, 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 101 of file ossl_cipher.c.
References AllocCipher, eCipherError, EVP_CipherInit_ex, GetCipherInit, name, NULL, ossl_raise(), rb_eRuntimeError, and StringValuePtr.
Referenced by Init_ossl_cipher().
Definition at line 445 of file ossl_cipher.c.
References EVP_CIPHER_name, GetCipher, and rb_str_new2().
Referenced by Init_ossl_cipher().
Definition at line 56 of file ossl_cipher.c.
References AllocCipher, cCipher, eCipherError, EVP_CipherInit_ex, NULL, ossl_cipher_alloc(), and ossl_raise().
Definition at line 297 of file ossl_cipher.c.
References eCipherError, EVP_CipherInit_ex, GetCipher, GetDigestPtr(), id_key_set, key, NIL_P, NULL, NUM2INT, OPENSSL_cleanse, 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 184 of file ossl_cipher.c.
References eCipherError, EVP_CipherInit_ex, GetCipher, NULL, and ossl_raise().
Referenced by Init_ossl_cipher().
Definition at line 499 of file ossl_cipher.c.
References eCipherError, EVP_CipherInit_ex, GetCipher, NULL, ossl_raise(), RSTRING_LEN, RSTRING_PTR, and StringValue.
Referenced by Init_ossl_cipher().
Definition at line 466 of file ossl_cipher.c.
References eCipherError, EVP_CipherInit_ex, GetCipher, id_key_set, key, NULL, ossl_raise(), Qtrue, rb_ivar_set(), RSTRING_LEN, RSTRING_PTR, and StringValue.
Referenced by Init_ossl_cipher().
Definition at line 697 of file ossl_cipher.c.
References eCipherError, GetCipher, NULL, NUM2INT, and ossl_raise().
Referenced by Init_ossl_cipher().
Definition at line 368 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 328 of file ossl_cipher.c.
References UPDATE_LENGTH_LIMIT.
Referenced by ossl_cipher_update().
VALUE cCipher |
Definition at line 36 of file ossl_cipher.c.
Referenced by Init_ossl_cipher(), and ossl_cipher_new().
VALUE eCipherError |
Definition at line 37 of file ossl_cipher.c.
Referenced by Init_ossl_cipher(), ossl_cipher_copy(), ossl_cipher_final(), ossl_cipher_init(), ossl_cipher_initialize(), ossl_cipher_new(), ossl_cipher_pkcs5_keyivgen(), ossl_cipher_reset(), ossl_cipher_set_iv(), ossl_cipher_set_key(), ossl_cipher_set_key_length(), and ossl_cipher_update().
|
static |
Definition at line 38 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().