example CLI:
 authentication-key 3 3109a60f51374a0d
 To remove the authentication-key altogether,
 set the password to empty string
493259
def authentication_key_set(enctype, pw)
      state = pw.empty? ? 'no' : ''
      enctype = pw.empty? ? '' : Encryption.symbol_to_cli(enctype)
      set_args_keys(state: state, enctype: enctype, password: pw)
      config_set('ospf_area_vlink', 'authentication_key_set', @set_args)
    end
574842
def destroy(self, sshkeyid, params=None):
        ''' 
        '''
        params = update_params(params, {'SSHKEYID': sshkeyid})
        return self.request('/v1/sshkey/destroy', params, 'POST')
558741
def remove(self, username, user_api, filename=None, force=False):
        """"""
        self.keys = API.__get_keys(filename)
        self.username = username
        user = user_api.find(username)[0]

        if not force:  # pragma: no cover
            self.__confirm()

        for key in self.__delete_keys():
            operation = {'sshPublicKey': [(ldap3.MODIFY_DELETE, [key])]}
            self.client.modify(user.entry_dn, operation)
1202311
def set_(key, value, service=None, profile=None):
    '''
    
    '''
    service = _get_service(service, profile)
    keyring.set_password(service, key, value)
790763
def remove_password(entry, username=None):
    

    if username is None:
        username = get_username()

    has_keychain = initialize_keychain()

    if has_keychain:
        try:
            keyring.delete_password(entry, username)
        except Exception as e:
            print e
            log.warn("Unable to delete password in keyring. Continuing..")
            log.debug(e)
961921
def remove_password_from_url(url):
    # type: (S) -> S
    

    parsed = _get_parsed_url(url)
    if parsed.auth:
        auth, _, _ = parsed.auth.partition(":")
        return parsed._replace(auth="{auth}:----".format(auth=auth)).url
    return parsed.url
638051
def unlock(self, password = None, keyfile = None, buf = None):
        

        if ((password is None or password == "") and (keyfile is None or
             keyfile == "")):
            raise KPError("A password/keyfile is needed")
        elif ((type(password) is not str and password is not None) or
              (type(keyfile) is not str and keyfile is not None)):
            raise KPError("password/keyfile must be a string.")
        if keyfile == "":
            keyfile = None
        if password == "":
            password = None
        self.password = password
        self.keyfile = keyfile
        return self.load(buf)
1154949
def reset_password(server_context, email, container_path=None):
    
    url = server_context.build_url(security_controller, 'adminRotatePassword.api', container_path)

    return server_context.make_request(url, {
        'email': email
    })
1133340
def remove_credential(username)
      raise ArgumentError, "The username cannot be nil"   unless username
      raise ArgumentError, "The username cannot be empty" if username.empty?

      self.service.removeCredential(username.to_s)
      
      @credentials = nil
    end
391717
def destroy_ssh_key(self, ssh_key_id):
        
        json = self.request('/ssh_keys/%s/destroy' % ssh_key_id, method='GET')
        status = json.get('status')
        return status
765446
def password(rest):
	
	charsets = [
		string.ascii_lowercase,
		string.ascii_uppercase,
		string.digits,
		string.punctuation,
	]
	passwd = []

	try:
		length = rest.strip() or 12
		length = int(length)
	except ValueError:
		return 'need an integer password length!'

	for i in range(length):
		passwd.append(random.choice(''.join(charsets)))

	if length >= len(charsets):
		# Ensure we have at least one character from each charset
		replacement_indices = random.sample(range(length), len(charsets))
		for i, charset in zip(replacement_indices, charsets):
			passwd[i] = random.choice(charset)

	return ''.join(passwd)
219363
def set_basic_auth(self, username, password):
        """"""
        credentials = str(b64encode('{}:{}'.format(username, password).encode('utf-8')), 'utf-8')
        self.authorization = 'Basic {}'.format(credentials)
753256
def auth_remove(name, drop, **kwargs):
    
    ctx = Context(**kwargs)
    ctx.execute_action('auth:group:remove', **{
        'storage': ctx.repo.create_secure_service('storage'),
        'name': name,
        'drop': drop,
    })
1207178
def set_basic_auth(self, username, password):
        
        from requests.auth import HTTPBasicAuth
        self.auth = HTTPBasicAuth(username, password)
        return self
1292315
async def finish_authentication(self, username, password):
        
        # Step 1
        self.srp.step1(username, password)
        data = await self._send_plist(
            'step1', method='pin', user=username)
        resp = plistlib.loads(data)

        # Step 2
        pub_key, key_proof = self.srp.step2(resp['pk'], resp['salt'])
        await self._send_plist(
            'step2',
            pk=binascii.unhexlify(pub_key),
            proof=binascii.unhexlify(key_proof))

        # Step 3
        epk, tag = self.srp.step3()
        await self._send_plist('step3', epk=epk, authTag=tag)
        return True
1369452
def _auth_key(nonce, username, password):
    
    digest = _password_digest(username, password)
    md5hash = hashlib.md5()
    data = "%s%s%s" % (nonce, username, digest)
    md5hash.update(data.encode('utf-8'))
    return _unicode(md5hash.hexdigest())
750301
def reset_passwd(self, data):
        
        error = False
        msg = ""

        # Check input format
        if len(data["passwd"]) < 6:
            error = True
            msg = _("Password too short.")
        elif data["passwd"] != data["passwd2"]:
            error = True
            msg = _("Passwords don't match !")

        if not error:
            passwd_hash = hashlib.sha512(data["passwd"].encode("utf-8")).hexdigest()
            user = self.database.users.find_one_and_update({"reset": data["reset_hash"]},
                                                           {"$set": {"password": passwd_hash},
                                                            "$unset": {"reset": True, "activate": True}})
            if user is None:
                error = True
                msg = _("Invalid reset hash.")
            else:
                msg = _("Your password has been successfully changed.")

        return msg, error