# RSA signing with Ruby OpenSSL

**URL:** <https://www.ruby-forum.com/t/rsa-signing-with-ruby-openssl/135002>\
**Category:** Rails\
**Created:** [April 17, 2008, 12:11am UTC](https://www.ruby-forum.com/t/rsa-signing-with-ruby-openssl/135002 "2008-04-17T00:11:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 17, 2008, 12:11am UTC](https://www.ruby-forum.com/t/rsa-signing-with-ruby-openssl/135002/1 "2008-04-17T00:11:13Z")

</div>

hi all -

I’m not sure if this is the correct forum but i was wondering if  
anyone has successfully done RSA-SHA1 signing with Ruby OpenSSL and  
interoperated with Java Servers.

I’m using the following code but i’m not sure if the “sign” method on  
works properly -

@key = OpenSSL::PKey::RSA.new(2048)  
#sign  
@key.send(“sign”, OpenSSL::Digest.::SHA1.new, “text to sign”)

The expected signature from above “sign” is not what i know the Java  
crytpo api likes.

Thanks in advance.

regards,  
Vaibhav

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [April 3, 2009, 5:38pm UTC](https://www.ruby-forum.com/t/rsa-signing-with-ruby-openssl/135002/2 "2009-04-03T17:38:32Z")

</div>

removed\_email\_address@domain.invalid wrote:  
I am using the allready created tables in oracle and connecting to the  
ruby on rails model class, i used 'set\_table\_name ‘table name’ ’ and it  
gets connected but, i want to access its records and it has different id  
field name as field\_id, i want to access its record making field\_id  
field as my id field so that i can access its records but i dont want to  
rename field\_id to id sence, it has laks of records and my company is  
using those records can any one sugust me the way to connect the model  
to field\_id column…plz help

Thanks in advance…
