Home > rencrypt

rencrypt

Rencrypt is a project mainly written in Ruby, it's free.

ruby encryption library

Warranty

This software is provided "as is" and without any express or implied warranties, including, without limitation, the implied warranties of merchantibility and fitness for a particular purpose.


To create a key: % openssl genrsa -des3 -out private.pem 2048 Generating RSA private key, 2048 bit long modulus ......+++ .+++ e is 65537 (0x10001) Enter pass phrase for private.pem: Verifying - Enter pass phrase for private.pem:

Then: % openssl rsa -in private.pem -out public.pem -outform PEM -pubout Enter pass phrase for private.pem: writing RSA key


To Encrypt:

require 'REncrypt' => true privkey='/path/to/private.pem' => "/path/to/private.pem" pubkey='/path/to/public.pem' => "/path/to/public.pem" a= Rencrypt.encryptsensitive(pubkey, "some kind of data") => ["16331332e36325301363}20327734232525m26$3172212002237352>tS355340310k333&", "}[322012063013143023W2712526363355214+H360233312128302320276%3531626315p222{CQI"4"4377223(366${06332 254p34vM310263x223364227223242:376Qfc306]374253X&343350[5243vM204tQW264300[`341F361245316'2433713620f212217255321e315264247}311227220226'23527-05 e313H216:242(23342I343O213277M177r2230320625315>353247v8N243S301177342"223n#CLv3221246301236367!0324102L2343360?225361310310S254263 37331250347355]356373276A33000275360306200G22525234701#305-237^3763632036025406233}225262230 250216T*3220422104360z2320503)3123043513106e32247$h25367 w375", "320223343 373276220374247360s30{354264:360261vf;W322344222235[325o334e)326A233215DEN214337325273]221!f313336351213371300343266_221205265v172452521X2634621022635 ?25534<331M364266232224347247tuX3702111231350F341G^n355202351311E230^e^230205bN#250<s263}271Go0212262iq267v205357M0236Q340`30a06(1267361L36324fV213(276:F*310200@21624241a<37032350I))224O372340320272.234335D325!273O02706375G XV311325ml!262N256370216f305364$3502213245$<217$Z1222] G234272304342361&uP356Z2433330242225aE224367+z20311zM371325 A26416^1737626631205"]

To Decrypt: Rencrypt.decrypt_sensitive(privkey, a[0], a[1], a[2], "somepasswordthatissecure") => "some kind of data"