Sha256: b3aa5bceb5a6ea3086aeaf5b05d25af7393b9c8515353823697b424350c8e138

Contents?: true

Size: 702 Bytes

Versions: 28

Compression:

Stored size: 702 Bytes

Contents

# frozen_string_literal: false
#--
#
# = 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 licensed under the same licence as Ruby.
# (See the file 'LICENCE'.)
#++

module OpenSSL
  class BN
    include Comparable

    def pretty_print(q)
      q.object_group(self) {
        q.text ' '
        q.text to_i.to_s
      }
    end
  end # BN
end # OpenSSL

##
# Add double dispatch to Integer
#
class Integer
  # Casts an Integer as an OpenSSL::BN
  #
  # See `man bn` for more info.
  def to_bn
    OpenSSL::BN::new(self)
  end
end # Integer

Version data entries

28 entries across 28 versions & 4 rubygems

Version Path
rhodes-7.6.0 lib/extensions/openssl/openssl/bn.rb
rhodes-7.5.1 lib/extensions/openssl/openssl/bn.rb
rhodes-7.4.1 lib/extensions/openssl/openssl/bn.rb
rubysl-openssl-2.13 lib/openssl/bn.rb
rubysl-openssl-2.12 lib/openssl/bn.rb
rubysl-openssl-2.11 lib/openssl/bn.rb
rhodes-7.1.17 lib/extensions/openssl/openssl/bn.rb
rhodes-6.2.0 lib/extensions/openssl/openssl/bn.rb
openssl-2.0.9 lib/openssl/bn.rb
openssl-2.0.8 lib/openssl/bn.rb
rubysl-openssl-2.10 lib/openssl/bn.rb
openssl-2.0.7 lib/openssl/bn.rb
rhodes-6.0.11 lib/extensions/openssl/openssl/bn.rb
openssl-2.0.6 lib/openssl/bn.rb
openssl-2.0.5 lib/openssl/bn.rb
openssl-2.0.4 lib/openssl/bn.rb
openssl-2.0.3 lib/openssl/bn.rb
ruby-compiler-0.1.1 vendor/ruby/ext/openssl/lib/openssl/bn.rb
openssl-2.0.2 lib/openssl/bn.rb
openssl-2.0.1 lib/openssl/bn.rb