Builds the binary string which is sent as the association accept (in response to an association request).

 === Parameters

 * <tt>info</tt> -- The association information hash.
761987
def build_association_accept(info)
      # Big endian encoding:
      @outgoing.endian = @net_endian
      # Clear the outgoing binary string:
      @outgoing.reset
      # No abstract syntax in association response. To make this work with the method that
      # encodes the presentation context, we pass on a one-element array containing nil).
      abstract_syntaxes = Array.new(1, nil)
      # Note: The order of which these components are built is not arbitrary.
      append_application_context
      # Reset the presentation context instance variable:
      @presentation_contexts = Hash.new
      # Create the presentation context hash object that will be passed to the builder method:
      p_contexts = Hash.new
      # Build the presentation context strings, one by one:
      info[:pc].each do |pc|
        @presentation_contexts[pc[:presentation_context_id]] = pc[:selected_transfer_syntax]
        # Add the information from this pc item to the p_contexts hash:
        p_contexts[pc[:abstract_syntax]] = Hash.new unless p_contexts[pc[:abstract_syntax]]
        transfer_syntaxes = pc[:selected_transfer_syntax].nil? ? [] : [ pc[:selected_transfer_syntax] ]
        p_contexts[pc[:abstract_syntax]][pc[:presentation_context_id]] = {:transfer_syntaxes => transfer_syntaxes, :result => pc[:result]}
      end
      append_presentation_contexts(p_contexts, ITEM_PRESENTATION_CONTEXT_RESPONSE)
      append_user_information(@user_information)
      # Header must be built last, because we need to know the length of the other components.
      append_association_header(PDU_ASSOCIATION_ACCEPT, info[:called_ae])
    end
202900
def to_s(infoHash = nil)
      def makeFlags(peer)
        s = "["
        s << "c" if peer.amChoked
        s << "i" if peer.peerInterested
        s << "C" if peer.peerChoked
        s << "I" if peer.amInterested
        s << "]"
        s
      end    

      if infoHash
        s = "Peers: \n"
        peers = @peersByInfoHash[infoHash]
        if peers
          peers.each do |peer|
            s << "  #{peer.to_s} #{makeFlags(peer)}\n"
          end
        end
      else
        "PeerHolder"
      end
      s 
    end
343293
def info(message = nil, &block)
      logger.add(Logger::INFO, message, self.logging_prefix, &block)
    end
482175
public static String encryptToMD5(String info) {
		byte[] digesta = null;
		try {
			MessageDigest alga = MessageDigest.getInstance("MD5");
			alga.update(info.getBytes());
			digesta = alga.digest();
		} catch (NoSuchAlgorithmException e) {
			e.printStackTrace();
		}
		// to string
		return byte2hex(digesta);
	}
791550
protected function buildInformation()
    {
        $information = explode('\\', $this->getClass());

        if (!$this->isExtendable()) {
            $this->valid = false;

            return;
        }

        if (3 !== \count($information)) {
            $this->valid = false;

            return;
        }

        if ($information[0].$information[1] !== $information[2]) {
            $this->valid = false;

            return;
        }

        $this->name = $information[\count($information) - 1];
        $this->vendor = $information[0];
        $this->namespace = sprintf('%s\\%s', $this->vendor, $information[1]);
        $this->extendedDirectory =
            str_replace(':vendor', $this->vendor, $this->configuration['application_dir']).
            \DIRECTORY_SEPARATOR.
            $information[1];
        $this->extendedNamespace = sprintf(
            '%s%s\\%s',
            $this->configuration['namespace_prefix'],
            str_replace(':vendor', $this->vendor, $this->configuration['namespace']),
            $information[1]
        );
        $this->application = explode('\\', $this->configuration['namespace'])[0];
        $this->valid = true;

        $this->ormMetadata = new OrmMetadata($this);
        $this->odmMetadata = new OdmMetadata($this);
        $this->phpcrMetadata = new PhpcrMetadata($this);
    }
343953
def info(m)
      puts _word_wrap(m, '# ').blue
      @targets.each { |_, t| t.info(m) }
    end
871368
def serialize
      serialized = {}

      # set basic info
      serialized[:id] = id
      serialized[:title] = title
      serialized[:meta_language] = meta_language
      serialized[:meta_permalink] = meta_permalink

      # add tag parent informations
      serialized[:other_informations] = serialize_other_informations

      # return serialized post
      serialized
    end
158343
def add_info(self, data):
        """"""
        for key in data:
            # verboten
            if key in ('status','state','name','id','application','services','release'):
                raise ValueError("Sorry, cannot set build info with key of {}".format(key))
            self.obj[key] = data[key]
        self.changes.append("Adding build info")
        return self
1213068
def make_multisig_segwit_info( m, pks ):
    
    pubs = []
    privkeys = []
    for pk in pks:
        priv = BitcoinPrivateKey(pk, compressed=True)
        priv_hex = priv.to_hex()
        pub_hex = priv.public_key().to_hex()

        privkeys.append(priv_hex)
        pubs.append(keylib.key_formatting.compress(pub_hex))

    script = None

    if len(pubs) == 1:
        if m != 1:
            raise ValueError("invalid m: len(pubkeys) == 1")

        # 1 pubkey means p2wpkh
        key_hash = hashing.bin_hash160(pubs[0].decode('hex')).encode('hex')
        script = '160014' + key_hash
        addr = btc_make_p2sh_address(script[2:])

    else:
        # 2+ pubkeys means p2wsh 
        script = make_multisig_script(pubs, m)
        addr = make_multisig_segwit_address_from_witness_script(script)

    return {
        'address': addr,
        'redeem_script': script,
        'private_keys': privkeys,
        'segwit': True,
        'm': m
    }
560851
def info(message)
      (m = filter(message, :info)) && each {|l| l.info(m)}
    end
829031
def match_uriinfo(cls, info):
        
        items = sorted(
            cls._entries.items(),
            key=lambda matcher_entries: matcher_entries[0].priority,
            reverse=True,
        )
        for matcher, value in items:
            if matcher.matches(info):
                return (matcher, info)

        return (None, [])
314711
function getInfo(hash) {
  const info = getHashInfo(hash);
  const algo = getAlgorithmFromId(info.id);
  info.algorithm = algo.name;
  info.options = algo.getOptions(hash, info);

  return info;
}
816197
def info():
    
    try:
        platform_info = {"system": platform.system(), "release": platform.release()}
    except IOError:
        platform_info = {"system": "Unknown", "release": "Unknown"}

    implementation = platform.python_implementation()

    if implementation == "CPython":
        implementation_version = platform.python_version()
    elif implementation == "PyPy":
        implementation_version = "%s.%s.%s" % (
            sys.pypy_version_info.major,
            sys.pypy_version_info.minor,
            sys.pypy_version_info.micro,
        )
        if sys.pypy_version_info.releaselevel != "final":
            implementation_version = "".join(
                [implementation_version, sys.pypy_version_info.releaselevel]
            )
    else:
        implementation_version = "Unknown"

    return {
        "platform": platform_info,
        "implementation": {"name": implementation, "version": implementation_version},
        "cryptography": {"version": getattr(cryptography, "__version__", "")},
        "pyjwt": {"version": pyjwt_version},
    }
546340
def info(path)
      info   = {}
      object = object! path

      info[:history] = history path
      info[:mode]    = object.mode
      info[:name]    = object.name
      info[:path]    = path
      info[:sha]     = object.id

      info[:created]  = info[:history].last.committed_date
      info[:modified] = info[:history].first.committed_date

      if object.is_a? Grit::Blob
        info[:mime] = object.mime_type
        info[:size] = object.size
        info[:type] = :blob
      else
        info[:path] += '/'
        info[:type] = :tree
      end

      info
    end
1361930
def append_info_to_payload(payload)
      super
      payload[:session_id] = request.session_options[:id]
      payload[:uuid] = request.uuid
      payload[:host] = request.host
    end
544786
def interpret_association_request(message)
      info = Hash.new
      msg = Stream.new(message, @net_endian)
      # Protocol version (2 bytes)
      info[:protocol_version] = msg.decode(2, "HEX")
      # Reserved (2 bytes)
      msg.skip(2)
      # Called AE (shall be returned in the association response) (16 bytes)
      info[:called_ae] = msg.decode(16, "STR")
      # Calling AE (shall be returned in the association response) (16 bytes)
      info[:calling_ae] = msg.decode(16, "STR")
      # Reserved (32 bytes)
      msg.skip(32)
      # APPLICATION CONTEXT:
      # Item type (1 byte)
      info[:application_item_type] = msg.decode(1, "HEX") # 10H
      # Reserved (1 byte)
      msg.skip(1)
      # Application item length (2 bytes)
      info[:application_item_length] = msg.decode(2, "US")
      # Application context (variable length)
      info[:application_context] = msg.decode(info[:application_item_length], "STR")
      # PRESENTATION CONTEXT:
      # As multiple presentation contexts may occur, we need a loop to catch them all:
      # Each presentation context hash will be put in an array, which will be put in the info hash.
      presentation_contexts = Array.new
      pc_loop = true
      while pc_loop do
        # Item type (1 byte)
        item_type = msg.decode(1, "HEX")
        if item_type == ITEM_PRESENTATION_CONTEXT_REQUEST
          pc = Hash.new
          pc[:presentation_item_type] = item_type
          # Reserved (1 byte)
          msg.skip(1)
          # Presentation context item length (2 bytes)
          pc[:presentation_item_length] = msg.decode(2, "US")
          # Presentation context id (1 byte)
          pc[:presentation_context_id] = msg.decode(1, "BY")
          # Reserved (3 bytes)
          msg.skip(3)
          presentation_contexts << pc
          # A presentation context contains an abstract syntax and one or more transfer syntaxes.
          # ABSTRACT SYNTAX SUB-ITEM:
          # Abstract syntax item type (1 byte)
          pc[:abstract_syntax_item_type] = msg.decode(1, "HEX")
          # Reserved (1 byte)
          msg.skip(1)
          # Abstract syntax item length (2 bytes)
          pc[:abstract_syntax_item_length] = msg.decode(2, "US")
          # Abstract syntax (variable length)
          pc[:abstract_syntax] = msg.decode(pc[:abstract_syntax_item_length], "STR")
          ## TRANSFER SYNTAX SUB-ITEM(S):
          # As multiple transfer syntaxes may occur, we need a loop to catch them all:
          # Each transfer syntax hash will be put in an array, which will be put in the presentation context hash.
          transfer_syntaxes = Array.new
          ts_loop = true
          while ts_loop do
            # Item type (1 byte)
            item_type = msg.decode(1, "HEX")
            if item_type == ITEM_TRANSFER_SYNTAX
              ts = Hash.new
              ts[:transfer_syntax_item_type] = item_type
              # Reserved (1 byte)
              msg.skip(1)
              # Transfer syntax item length (2 bytes)
              ts[:transfer_syntax_item_length] = msg.decode(2, "US")
              # Transfer syntax name (variable length)
              ts[:transfer_syntax] = msg.decode(ts[:transfer_syntax_item_length], "STR")
              transfer_syntaxes << ts
            else
              # Break the transfer syntax loop, as we have probably reached the next stage,
              # which is either user info or a new presentation context entry. Rewind:
              msg.skip(-1)
              ts_loop = false
            end
          end
          pc[:ts] = transfer_syntaxes
        else
          # Break the presentation context loop, as we have probably reached the next stage, which is user info. Rewind:
          msg.skip(-1)
          pc_loop = false
        end
      end
      info[:pc] = presentation_contexts
      # USER INFORMATION:
      # Item type (1 byte)
      info[:user_info_item_type] = msg.decode(1, "HEX")
      # Reserved (1 byte)
      msg.skip(1)
      # User information item length (2 bytes)
      info[:user_info_item_length] = msg.decode(2, "US")
      # User data (variable length):
      while msg.index < msg.length do
        # Item type (1 byte)
        item_type = msg.decode(1, "HEX")
        # Reserved (1 byte)
        msg.skip(1)
        # Item length (2 bytes)
        item_length = msg.decode(2, "US")
        case item_type
          when ITEM_MAX_LENGTH
            info[:max_pdu_length] = msg.decode(item_length, "UL")
          when ITEM_IMPLEMENTATION_UID
            info[:implementation_class_uid] = msg.decode(item_length, "STR")
          when ITEM_MAX_OPERATIONS_INVOKED
            # Asynchronous operations window negotiation (PS 3.7: D.3.3.3) (2*2 bytes)
            info[:maxnum_operations_invoked] = msg.decode(2, "US")
            info[:maxnum_operations_performed] = msg.decode(2, "US")
          when ITEM_ROLE_NEGOTIATION
            # SCP/SCU Role Selection Negotiation (PS 3.7 D.3.3.4)
            # Note: An association request may contain several instances of this item type (each with a different abstract syntax).
            uid_length = msg.decode(2, "US")
            role = Hash.new
            # SOP Class UID (Abstract syntax):
            role[:sop_uid] = msg.decode(uid_length, "STR")
            # SCU Role (1 byte):
            role[:scu] = msg.decode(1, "BY")
            # SCP Role (1 byte):
            role[:scp] = msg.decode(1, "BY")
            if info[:role_negotiation]
              info[:role_negotiation] << role
            else
              info[:role_negotiation] = [role]
            end
          when ITEM_IMPLEMENTATION_VERSION
            info[:implementation_version] = msg.decode(item_length, "STR")
          else
            # Unknown item type:
            # Value (variable length)
            value = msg.decode(item_length, "STR")
            logger.warn("Unknown user info item type received. Please update source code or contact author. (item type: " + item_type + ")")
        end
      end
      stop_receiving
      info[:valid] = true
      return info
    end
817537
def address_info(id)
      body = self.gov_talk_request({
        message: 'CRA_AddrGetAddressInfoByID',
        class:   'CRA_AddrGetAddressInfoByID',
        params: {
          long: id,
        }
      })
      # puts body.to_s
      CRA::AddressInfo.init_from_hash(body['AddressInfo'])
    end