Add a number of public keys together.
772400
def combine(pubkeys)
      raise ArgumentError, 'must give at least 1 pubkey' if pubkeys.empty?

      outpub = FFI::Pubkey.new.pointer
      #pubkeys.each {|item| }

      res = C.secp256k1_ec_pubkey_combine(@ctx, outpub, pubkeys, pubkeys.size)
      raise AssertError, 'failed to combine public keys' unless res == 1

      @public_key = outpub
      outpub
    end
1122239
public void setupKeys()
    {
        KeyAreaInfo keyArea = null;
        keyArea = new KeyAreaInfo(this, Constants.UNIQUE, ID_KEY);
        keyArea.addKeyField(ID, Constants.ASCENDING);
        keyArea = new KeyAreaInfo(this, Constants.SECONDARY_KEY, USER_NAME_KEY);
        keyArea.addKeyField(USER_NAME, Constants.ASCENDING);
    }
366848
public function addPubkey($pubkey)
    {
        if (!$this->getPubkeys()) {
            return $this->setPubkeys(array($pubkey));
        } else {
            return $this->setPubkeys(
                array_merge($this->getPubkeys(), array($pubkey))
            );
        }
    }
161075
def keypair_add(name, pubfile=None, pubkey=None, profile=None, **kwargs):
    '''
    
    '''
    conn = _auth(profile, **kwargs)
    return conn.keypair_add(
        name,
        pubfile,
        pubkey
    )
140948
def add(self, *keys):
        
        def decorator(func):
            for key in keys:
                self[key] = func
            return func
        return decorator
655715
def add_key(self, key, first=False):
        
        if first:
            self.keys = [key] + self.keys
        else:
            self.keys.append(key)
        if isinstance(key, VSpaceKey):
            self.space = key
1073362
public synchronized void add(GenericKeys key) {
        KeyBucket bucket = makeBucket(key.getName().charAt(0));
        if (null != bucket) {
            bucket.add(key);
        }
    }
306884
@Override
  public void fillAssignedKeys(Set<String> keys)
  {
    keys.add(_column.getColumn().name());
  }
1359317
def add_encrypted(public, encrypted_a, encrypted_b, output):
    
    log("Loading public key")
    publickeydata = json.load(public)
    pub = load_public_key(publickeydata)

    log("Loading first encrypted number")
    enc_a = load_encrypted_number(encrypted_a, pub)

    log("Loading second encrypted number")
    enc_b = load_encrypted_number(encrypted_b, pub)

    log("Adding encrypted numbers together")

    enc_result = enc_a + enc_b
    serialised_result = serialise_encrypted(enc_result)
    print(serialised_result, file=output)
355660
public function addKeys( $keys )
	{
		if( !is_array( $keys ) )
			throw new InvalidArgumentException( 'An Array should be given.' );
		foreach( $keys as $key )
			$this->addKey( $key );
	}
1151927
protected function addForeignKeys()
    {
        $this->addForeignKey(
            $this->db->getForeignKeyName(TokensRecord::tableName(), 'providerId'),
            TokensRecord::tableName(),
            'providerId',
            ProviderRecord::tableName(),
            'id',
            'CASCADE'
        );
    }
150248
function ecp_pubkey(Q, p, a, G, d, l) {
	var R = ecp_new(l);
	ecp_proj(Q, ecp_mul(R, d, G, a, p, l), p, l);
}
132386
def add(user_id, resource_policy, admin, inactive,  rate_limit):
    '''
    
    '''
    try:
        user_id = int(user_id)
    except ValueError:
        pass  # string-based user ID for Backend.AI v1.4+
    with Session() as session:
        try:
            data = session.KeyPair.create(
                user_id,
                is_active=not inactive,
                is_admin=admin,
                resource_policy=resource_policy,
                rate_limit=rate_limit)
        except Exception as e:
            print_error(e)
            sys.exit(1)
        if not data['ok']:
            print_fail('KeyPair creation has failed: {0}'.format(data['msg']))
            sys.exit(1)
        item = data['keypair']
        print('Access Key: {0}'.format(item['access_key']))
        print('Secret Key: {0}'.format(item['secret_key']))
1031455
def cache_keys(keys):
    """"""
    d = known_keys()
    known_names = dict(zip(d.values(), d.keys()))
    for k in keys:
        i = (ord(k),) if len(k) == 1 else known_names[k]
        _key_cache.insert(0, i)
1242433
def parse_public_keys(self):
        """"""
        public_keys = [formats.import_public_key(pk)
                       for pk in self.public_keys()]
        for pk, identity in zip(public_keys, self.identities):
            pk['identity'] = identity
        return public_keys
477700
def add(self, key, value):
        
        if not key in self.prefs:
            self.prefs[key] = []
        self.prefs[key].append(value)
1323058
def install_key(self, keyfile, authorized_keys):
        """"""

        # Make the directory containing the authorized_keys
        # file, if it doesn't exist. (Typically ~/.ssh).
        # Ignore errors; we'll fail shortly if we can't
        # create the authkeys file.
        try:
            os.makedirs(os.path.dirname(authorized_keys), 0o700)
        except OSError:
            pass

        keydata = open(keyfile).read()
        target_fd = os.open(authorized_keys, os.O_RDWR | os.O_CREAT, 0o600)
        self.install_key_data(keydata, os.fdopen(target_fd, 'w+'))