Kullanıcı şifresini encrypt ederek set eder.

        Args:
            raw_password (str)
171340
def set_password(self, raw_password):
        
        self.password = pbkdf2_sha512.encrypt(raw_password, rounds=10000,
                                              salt_size=10)
1331769
def password_set(username=None, password=None):
    
    result = keyring.set_password('supernova', username, password)

    # NOTE: keyring returns None when the storage is successful.  That's weird.
    if result is None:
        return True
    else:
        return False
759388
def compare(crypted_string, plain_string)
      BCrypt::Password.new(crypted_string).is_password?(plain_string)
    rescue BCrypt::Errors::InvalidHash
      false
    end
708562
def encrypt(self, plain, algorithm='md5'):
        
        plain = helper.to_bytes(plain)
        return getattr(hashlib, algorithm)(plain).hexdigest()
918549
def encrypt_key(password, salt)
      iterations, length = CRYPTERATIONS, HASH_BYTE_SIZE
      OpenSSL::PKCS5::pbkdf2_hmac_sha1(password, salt, iterations, length)
    end
265327
def encrypt(self, raw):
        
        padded = AESCipher.pad(raw)
        init_vec = Random.new().read(AES.block_size)
        cipher = AES.new(self._key, AES.MODE_CBC, init_vec)
        return b64encode(init_vec + cipher.encrypt(padded))
240180
def is_common_password(raw, freq=0):
    
    frequent = WORDS.get(raw, 0)
    if freq:
        return frequent > freq
    return bool(frequent)
974364
def check_password(cls, instance, raw_password, enable_hash_migration=True):
        
        verified, replacement_hash = instance.passwordmanager.verify_and_update(
            raw_password, instance.user_password
        )
        if enable_hash_migration and replacement_hash:
            if six.PY2:
                instance.user_password = replacement_hash.decode("utf8")
            else:
                instance.user_password = replacement_hash
        return verified
787853
def encrypt(key_id, plaintext, encryption_context=None, grant_tokens=None,
            region=None, key=None, keyid=None, profile=None):
    '''
    
    '''
    conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile)

    r = {}
    try:
        ciphertext = conn.encrypt(
            key_id,
            plaintext,
            encryption_context=encryption_context,
            grant_tokens=grant_tokens
        )
        r['ciphertext'] = ciphertext['CiphertextBlob']
    except boto.exception.BotoServerError as e:
        r['error'] = __utils__['boto.get_error'](e)
    return r
845542
def password_hash(password):
    
    try:
        return bcrypt_sha256.encrypt(password)
    except TypeError:
        return bcrypt_sha256.encrypt(password.decode('utf-8'))
353163
def set_password(self, password, encryptAlgo='MD5'):
		
		if not password:
			self.info['encryptionAlgorithmID'] = None
			self.info['keyHashAlgorithm'] = None
			return

		self.password = gntp.shim.b(password)
		self.encryptAlgo = encryptAlgo.upper()

		if not self.encryptAlgo in self.hash_algo:
			raise errors.UnsupportedError('INVALID HASH "%s"' % self.encryptAlgo)

		hashfunction = self.hash_algo.get(self.encryptAlgo)

		password = password.encode('utf8')
		seed = time.ctime().encode('utf8')
		salt = hashfunction(seed).hexdigest()
		saltHash = hashfunction(seed).digest()
		keyBasis = password + saltHash
		key = hashfunction(keyBasis).digest()
		keyHash = hashfunction(key).hexdigest()

		self.info['keyHashAlgorithmID'] = self.encryptAlgo
		self.info['keyHash'] = keyHash.upper()
		self.info['salt'] = salt.upper()
478251
def set_account_password(self, account, raw_password):
        
        luser = self._get_account(account.username)
        changes = changeset(luser, {
            'password': raw_password,
        })
        save(changes, database=self._database)
489058
def sign_raw_data(raw_data, privatekey_hex):
    
    if not isinstance(raw_data, (str, unicode)):
        raise ValueError("Data is not a string")

    raw_data = str(raw_data)

    si = ECSigner(privatekey_hex)
    si.update(raw_data)
    return si.finalize()
1120631
def import_private_key(self, pem_text, password=None):
		
		if isinstance(pem_text, str) is True:
			pem_text = pem_text.encode()
		if password is not None and isinstance(password, str) is True:
			password = password.encode()

		self.__set_private_key(
			serialization.load_pem_private_key(pem_text, password=password, backend=default_backend())
		)
416213
def set_password(self, raw_password):
        
        if raw_password is None:
            self.set_unusable_password()
        else:
            xmpp_backend.set_password(self.node, self.domain, raw_password)
1253710
def set_password(url, ownerToken, password):
    '''
        
    '''
    
    service, fileId, key = sendclient.common.splitkeyurl(url)
    rawKey = sendclient.common.unpadded_urlsafe_b64decode(key)
    keys = sendclient.common.secretKeys(rawKey, password, url)
    
    return api_password(service, fileId, ownerToken, keys.newAuthKey)
799592
def parse_raw_token(self, raw_token):
        ""
        if raw_token is None:
            return (None, None)
        qs = parse_qs(raw_token)
        token = qs.get('oauth_token', [None])[0]
        secret = qs.get('oauth_token_secret', [None])[0]
        return (token, secret)