Sha256: a77c94a9e32d386dcb4e577a51d5d9dbea8e66c51b5cbc3dfa0f9403dffc1fb6

Contents?: true

Size: 249 Bytes

Versions: 3

Compression:

Stored size: 249 Bytes

Contents


module Ccrypto
  class SecretKey

    def to_bin
      case @key
      when String
        @key
      else
        @key.key
      end
    end

    def length
      to_bin.length
    end

    def equals?(key)
      to_bin == key
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ccrypto-ruby-0.1.2 lib/ccrypto/ruby/ext/secret_key.rb
ccrypto-ruby-0.1.1 lib/ccrypto/ruby/ext/secret_key.rb
ccrypto-ruby-0.1.0 lib/ccrypto/ruby/ext/secret_key.rb