Method: OpenSSL::PKey::DH#params
- Defined in:
- ossl_pkey_dh.c
#params ⇒ Hash
Stores all parameters of key to the hash INSECURE: PRIVATE INFORMATIONS CAN LEAK OUT!!! Don’t use :-)) (I’s up to you)
346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 |
# File 'ossl_pkey_dh.c', line 346 static VALUE ossl_dh_get_params(VALUE self) { EVP_PKEY *pkey; VALUE hash; GetPKeyDH(self, pkey); hash = rb_hash_new(); rb_hash_aset(hash, rb_str_new2("p"), ossl_bn_new(pkey->pkey.dh->p)); rb_hash_aset(hash, rb_str_new2("g"), ossl_bn_new(pkey->pkey.dh->g)); rb_hash_aset(hash, rb_str_new2("pub_key"), ossl_bn_new(pkey->pkey.dh->pub_key)); rb_hash_aset(hash, rb_str_new2("priv_key"), ossl_bn_new(pkey->pkey.dh->priv_key)); return hash; } |