diff options
author | Michal Rokos <m.rokos@sh.cvut.cz> | 2002-06-04 06:44:42 +0000 |
---|---|---|
committer | Michal Rokos <m.rokos@sh.cvut.cz> | 2002-06-04 06:44:42 +0000 |
commit | a5180750f7ab485fba73dd6e9861536adf3b693b (patch) | |
tree | cd2cea7862bed69939cb64d20346a3f975b5a9cc /lib/openssl/bn.rb | |
parent | bc603852659675cd0c7420dd4d126780f7ba6ee2 (diff) | |
download | ruby-openssl-history-a5180750f7ab485fba73dd6e9861536adf3b693b.tar.gz |
Initial revision
Diffstat (limited to 'lib/openssl/bn.rb')
-rw-r--r-- | lib/openssl/bn.rb | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/lib/openssl/bn.rb b/lib/openssl/bn.rb new file mode 100644 index 0000000..f2ea761 --- /dev/null +++ b/lib/openssl/bn.rb @@ -0,0 +1,39 @@ +=begin += $RCSfile$ -- Ruby-space definitions that completes C-space funcs for BN + += Info + 'OpenSSL for Ruby 2' project + Copyright (C) 2002 Michal Rokos <m.rokos@sh.cvut.cz> + All rights reserved. + += Licence + This program is licenced under the same licence as Ruby. + (See the file 'LICENCE'.) + += Version + $Id$ +=end + +## +# Should we care what if somebody require this file directly? +#require 'openssl' + +module OpenSSL + +class BN + def to_i + to_s.to_i + end +end # BN + +end # OpenSSL + +## +# Add double dispatch to Integer +# +class Integer + def to_bn + OpenSSL::BN::new(self) + end +end # Integer + |