Add the tokens for the group signature
556798
def add_tokens_for_group(self, with_pass=False):
        """"""
        kls = self.groups.super_kls
        name = self.groups.kls_name

        # Reset indentation to beginning and add signature
        self.reset_indentation('')
        self.result.extend(self.tokens.make_describe(kls, name))

        # Add pass if necessary
        if with_pass:
            self.add_tokens_for_pass()

        self.groups.finish_signature()
999119
protected function addgroup_privat24(){
		$this->registerGroup(BLang::_('ADMIN_CONFIG_PAYMENT_PRIVAT24'),'privat24',array(
			new BConfigFieldInt(
				'PAYMENT_PRIVAT24_MERCHANT_ID',
				BLang::_('ADMIN_CONFIG_PAYMENT_PRIVAT24_MERCHANT_ID')),
			new BConfigFieldString(
				'PAYMENT_PRIVAT24_MERCHANT_PASS',
				BLang::_('ADMIN_CONFIG_PAYMENT_PRIVAT24_MERCHANT_PASS')),
			new BConfigFieldList(
				'PAYMENT_PRIVAT24_MERCHANT_CURRENCY',
				BLang::_('ADMIN_CONFIG_PAYMENT_PRIVAT24_MERCHANT_CURRENCY'),
				array(
					'UAH'=>'UAH',
					'USD'=>'USD',
					'EUR'=>'EUR',
					)
				),
			new BConfigFieldList(
				'PAYMENT_PRIVAT24_MERCHANT_ISTEST',
				BLang::_('ADMIN_CONFIG_PAYMENT_PRIVAT24_MERCHANT_ISTEST'),
				array(
					0=>BLang::_('ADMIN_CONFIG_PAYMENT_PRIVAT24_MERCHANT_ISTEST_0'),
					1=>BLang::_('ADMIN_CONFIG_PAYMENT_PRIVAT24_MERCHANT_ISTEST_1'),
					),
				0
				),

			));
		
		}
658263
def make_signature(signer_func, data_to_sign, public_algo,
                   hashed_subpackets, unhashed_subpackets, sig_type=0):
    """"""
    # pylint: disable=too-many-arguments
    header = struct.pack('>BBBB',
                         4,         # version
                         sig_type,  # rfc4880 (section-5.2.1)
                         public_algo,
                         8)         # hash_alg (SHA256)
    hashed = subpackets(*hashed_subpackets)
    unhashed = subpackets(*unhashed_subpackets)
    tail = b'\x04\xff' + struct.pack('>L', len(header) + len(hashed))
    data_to_hash = data_to_sign + header + hashed + tail

    log.debug('hashing %d bytes', len(data_to_hash))
    digest = hashlib.sha256(data_to_hash).digest()
    log.debug('signing digest: %s', util.hexlify(digest))
    params = signer_func(digest=digest)
    sig = b''.join(mpi(p) for p in params)

    return bytes(header + hashed + unhashed +
                 digest[:2] +  # used for decoder's sanity check
                 sig)
1151927
protected function addForeignKeys()
    {
        $this->addForeignKey(
            $this->db->getForeignKeyName(TokensRecord::tableName(), 'providerId'),
            TokensRecord::tableName(),
            'providerId',
            ProviderRecord::tableName(),
            'id',
            'CASCADE'
        );
    }
987164
def sign(params = {})
      params = additional_params.merge(params)
      digest = params.sort_by(&:first).map{ |key, value| "#{key}=#{value}" }.join

      if oauth2_session?
        params[:sig] = Digest::MD5.hexdigest("#{digest}" + Digest::MD5.hexdigest(options[:access_token] + SchoolFriend.secret_key))
        params[:access_token] = options[:access_token]
      else
        params[:sig] = Digest::MD5.hexdigest("#{digest}#{signature}")
      end

      params
    end
1180387
private void addGroup(String key, Group object) {
    int fieldIndex = getIndex(key);
    this.schema.getType(fieldIndex).asGroupType();
    this.data[fieldIndex].add(object);
  }
1014715
def _new_token(self, chars=None, line_no=None):
        

        if not line_no:
            line_no = self._line_no

        if not chars:
            chars = self._token_chars

        if chars:
            # add new token
            self._tokens.append((line_no, ''.join(chars)))
            self._token_chars = []
1047865
def _add_token(self, token, parent_node='root'):
        """"""
        if parent_node == 'root':
            parent_node = self.root

        token_node_id = 'token:{}'.format(self.token_count)
        self.add_node(token_node_id, layers={self.ns, self.ns+':token'},
                      attr_dict={self.ns+':token': token})
        self.add_edge(parent_node, token_node_id,
                      layers={self.ns},
                      edge_type=EdgeTypes.spanning_relation)
        self.tokens.append(token_node_id)
        self.token_count += 1
1299523
def _sign_multi(self, payload, signing_keys):
        
        if not isinstance(payload, Mapping):
            raise TypeError('Expecting a mapping object, as only '
                            'JSON objects can be used as payloads.')

        if not isinstance(signing_keys, list):
            raise TypeError("Expecting a list of keys")

        headers = []
        signatures = []
        payload_b64 = base64url_encode(json_encode(payload))

        for sk in signing_keys:
            signing_key = load_signing_key(sk, self.crypto_backend)

            header = self._make_header()
            header_b64 = base64url_encode(json_encode(header))
            signature_b64 = self._make_signature(header_b64, payload_b64, signing_key)

            headers.append(header_b64)
            signatures.append(signature_b64)

        jwt = {
            "header": headers,
            "payload": payload_b64,
            "signature": signatures
        }

        return jwt
210905
def setGroups(self, groups, kerningGroupConversionRenameMaps=None):
        
        skipping = []
        for name, members in groups.items():
            checked = []
            for m in members:
                if m in self.font:
                    checked.append(m)
                else:
                    skipping.append(m)
            if checked:
                self.font.groups[name] = checked
        if skipping:
            if self.verbose and self.logger:
                self.logger.info("\tNote: some glyphnames were removed from groups: %s (unavailable in the font)", ", ".join(skipping))
        if kerningGroupConversionRenameMaps:
            # in case the sources were UFO2, 
            # and defcon upconverted them to UFO3
            # and now we have to down convert them again,
            # we don't want the UFO3 public prefixes in the group names
            self.font.kerningGroupConversionRenameMaps = kerningGroupConversionRenameMaps
390395
def _set_signatures(self):
        """"""

        # We currently pass structs as void pointers.
        code_t = ctypes.c_int
        gpr_t = ctypes.c_int32
        int32_t = ctypes.c_int32
        node_p = ctypes.c_void_p
        pointer_t = ctypes.c_void_p
        state_p = ctypes.c_void_p
        void = None

        def sig(rettype, fname, *ptypes):
            func = getattr(self.lib, fname)
            func.restype = rettype
            func.argtypes = ptypes

        sig(node_p, "_jit_arg", state_p)
        sig(node_p, "_jit_finishi", state_p, pointer_t)
        sig(node_p, "_jit_forward", state_p)
        sig(node_p, "_jit_indirect", state_p)
        sig(node_p, "_jit_label", state_p)
        sig(node_p, "_jit_new_node_p", state_p, code_t, pointer_t)
        sig(node_p, "_jit_new_node_pww", state_p, code_t, pointer_t, word_t, word_t)
        sig(node_p, "_jit_new_node_qww", state_p, code_t, int32_t, int32_t, word_t)
        sig(node_p, "_jit_new_node_w", state_p, code_t, word_t)
        sig(node_p, "_jit_new_node_ww", state_p, code_t, word_t, word_t)
        sig(node_p, "_jit_new_node_www", state_p, code_t, word_t, word_t, word_t)
        sig(node_p, "_jit_note", state_p, char_p, ctypes.c_int)
        sig(pointer_t, "_jit_address", state_p, node_p)
        sig(pointer_t, "_jit_emit", state_p)
        sig(state_p, "jit_new_state")
        sig(void, "_jit_clear_state", state_p)
        sig(void, "_jit_destroy_state", state_p)
        sig(void, "_jit_ellipsis", state_p)
        sig(void, "_jit_epilog", state_p)
        sig(void, "_jit_finishr", state_p, gpr_t)
        sig(void, "_jit_getarg_i", state_p, gpr_t, node_p)
        sig(void, "_jit_getarg_l", state_p, gpr_t, node_p)
        sig(void, "_jit_link", state_p, node_p)
        sig(void, "_jit_patch", state_p, node_p)
        sig(void, "_jit_patch_at", state_p, node_p, node_p)
        sig(void, "_jit_prepare", state_p)
        sig(void, "_jit_prolog", state_p)
        sig(void, "_jit_pushargi", state_p, word_t)
        sig(void, "_jit_pushargr", state_p, gpr_t)
        sig(void, "_jit_ret", state_p)
        sig(void, "_jit_reti", state_p, word_t)
        sig(void, "_jit_retr", state_p, gpr_t)
        sig(void, "_jit_retval_c", state_p, gpr_t)
        sig(void, "_jit_retval_i", state_p, gpr_t)
        sig(void, "_jit_retval_s", state_p, gpr_t)
        sig(void, "_jit_retval_uc", state_p, gpr_t)
        sig(void, "_jit_retval_us", state_p, gpr_t)
        sig(void, "finish_jit")
        sig(void, "init_jit", ctypes.c_char_p) # NOTE: Don't use char_p

        if wordsize == 64:
            sig(void, "_jit_retval_l", state_p, gpr_t)
            sig(void, "_jit_retval_ui", state_p, gpr_t)
1103504
def add_group(self, group_attribs=None, parent=None):
        """"""
        if parent is None:
            parent = self.tree.getroot()
        elif not self.contains_group(parent):
            warnings.warn('The requested group {0} does not belong to '
                          'this Document'.format(parent))

        if group_attribs is None:
            group_attribs = {}
        else:
            group_attribs = group_attribs.copy()

        return SubElement(parent, '{{{0}}}g'.format(
            SVG_NAMESPACE['svg']), group_attribs)
1095650
private void addGroupName(int maxlength)
    {
        int maxisolength = 0;
        char offsets[] = new char[LINES_PER_GROUP_ + 2];
        char lengths[] = new char[LINES_PER_GROUP_ + 2];
        byte tokenlengths[] = new byte[m_tokentable_.length];

        // enumerate all groups
        // for (int i = m_groupcount_ - 1; i >= 0; i --) {
        for (int i = 0; i < m_groupcount_ ; i ++) {
            int offset = getGroupLengths(i, offsets, lengths);
            // enumerate all lines in each group
            // for (int linenumber = LINES_PER_GROUP_ - 1; linenumber >= 0;
            //    linenumber --) {
            for (int linenumber = 0; linenumber < LINES_PER_GROUP_;
                linenumber ++) {
                int lineoffset = offset + offsets[linenumber];
                int length = lengths[linenumber];
                if (length == 0) {
                    continue;
                }

                // read regular name
                int parsed[] = addGroupName(lineoffset, length, tokenlengths,
                                            m_nameSet_);
                if (parsed[0] > maxlength) {
                    // 0 for name length
                    maxlength = parsed[0];
                }
                lineoffset += parsed[1];
                if (parsed[1] >= length) {
                    // 1 for parsed group string length
                    continue;
                }
                length -= parsed[1];
                // read Unicode 1.0 name
                parsed = addGroupName(lineoffset, length, tokenlengths,
                                      m_nameSet_);
                if (parsed[0] > maxlength) {
                    // 0 for name length
                    maxlength = parsed[0];
                }
                lineoffset += parsed[1];
                if (parsed[1] >= length) {
                    // 1 for parsed group string length
                    continue;
                }
                length -= parsed[1];
                // read ISO comment
                parsed = addGroupName(lineoffset, length, tokenlengths,
                                      m_ISOCommentSet_);
                if (parsed[1] > maxisolength) {
                    maxisolength = length;
                }
            }
        }

        // set gMax... - name length last for threading
        m_maxISOCommentLength_ = maxisolength;
        m_maxNameLength_ = maxlength;
    }
826595
def _generate_tokens(pat: GenericAny, text: str) -> Iterator[Token]:
    
    rules = _TYPE_RULES
    keys = _TYPE_KEYS
    groupindex = pat.groupindex
    scanner = pat.scanner(text)
    for m in iter(scanner.match, None):
        lastgroup = m.lastgroup
        func = rules[keys[groupindex[lastgroup] - 1]]
        if func is not None:
            yield func(m.group(lastgroup))
1286320
public function addToken(Token $token)
    {
        $this->tokens[$this->getAppKey()][$token->getTokenUUID()->composeUUID()] = $token;
    }
790204
def progress(self):
        
        tokenum, value, scol = self.current.values()

        # Default to not appending anything
        just_append = False

        # Prevent from group having automatic pass given to it
        # If it already has a pass
        if tokenum == NAME and value == 'pass':
            self.groups.empty = False

        # Set variables to be used later on to determine if this will likely make group not empty
        created_group = False
        found_content = False
        if not self.groups.starting_group and not self.is_space:
            found_content = True

        if self.groups.starting_group:
            # Inside a group signature, add to it
            if tokenum == STRING:
                self.groups.name = value

            elif tokenum == NAME or (tokenum == OP and value == '.'):
                # Modify super class for group
                self.groups.modify_kls(value)

            elif tokenum == NEWLINE:
                # Premature end of group
                self.add_tokens_for_group(with_pass=True)

            elif tokenum == OP and value == ":":
                # Proper end of group
                self.add_tokens_for_group()

        elif self.groups.starting_single:
            # Inside single signature, add to it
            if tokenum == STRING:
                self.single.name = value

            elif tokenum == NEWLINE and not self.in_container:
                # Premature end of single
                self.add_tokens_for_single(ignore=True)

            elif tokenum == OP and value == ":":
                # Proper end of single
                self.add_tokens_for_single()

            elif value and self.single.name:
                # Only want to add args after the name for the single has been specified
                self.single.add_to_arg(tokenum, value)

        elif self.after_space or self.after_an_async or scol == 0 and tokenum == NAME:
            # set after_an_async if we found an async by itself
            # So that we can just have that prepended and still be able to interpret our special blocks
            with_async = self.after_an_async
            if not self.after_an_async and value == "async":
                self.after_an_async = True
            else:
                self.after_an_async = False

            if value in ('describe', 'context'):
                created_group = True

                # add pass to previous group if nothing added between then and now
                if self.groups.empty and not self.groups.root:
                    self.add_tokens_for_pass()

                # Start new group
                self.groups = self.groups.start_group(scol, value)
                self.all_groups.append(self.groups)

            elif value in ('it', 'ignore'):
                self.single = self.groups.start_single(value, scol)

            elif value in ('before_each', 'after_each'):
                setattr(self.groups, "has_%s" % value, True)
                if with_async:
                    setattr(self.groups, "async_%s" % value, True)
                self.add_tokens_for_test_helpers(value, with_async=with_async)

            else:
                just_append = True
        else:
            # Don't care about it, append!
            just_append = True

        # Found something that isn't whitespace or a new group
        # Hence current group isn't empty !
        if found_content and not created_group:
            self.groups.empty = False

        # Just append if token should be
        if just_append:
            self.result.append([tokenum, value])
62757
def add_group(self, number, name, led_type):
        
        group = group_factory(self, number, name, led_type)
        self.groups.append(group)
        return group