Go Back   CodingForums.com > :: Server side development > Ruby & Ruby On Rails

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-12-2007, 08:40 PM   PM User | #1
therealseger
New to the CF scene

 
Join Date: Dec 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
therealseger is an unknown quantity at this point
OpenSSL::PKey::RSA

When creating an OpenSSL::PKey::RSA object you get an exponent and a modulus that can be used to construct the public and private key. So if I say something like:

@key = OpenSSL::PKey::RSA.new

then,

@key.e

which is the exponent I might get a number like this back:

65537 (the modulus would be a much larger number). What I need to know is, in what form is that number? Hex? Base64? The reason I need to know is because I need to take those parts of the key and place it in an xml formatted field so I can decrypt my data in VB, but VB does not like the decimal representation of that data. Thanks for any and all help,

-T
therealseger is offline   Reply With Quote
Old 12-14-2007, 08:29 PM   PM User | #2
ralph l mayo
Regular Coder

 
ralph l mayo's Avatar
 
Join Date: Nov 2005
Posts: 951
Thanks: 1
Thanked 31 Times in 29 Posts
ralph l mayo is on a distinguished road
puts @key.e.class #=> OpenSSL::BN

It's just a regular decimal number. It may be a larger decimal number that can be represented in 32 bits though, so you'll likely need to use a big number library for VB, and transport the numbers around as strings.
ralph l mayo is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:59 PM.


Advertisement
Log in to turn off these ads.