(pubkey, password)
return base64.b64encode(encrypted_password)
Encrypt password using given RSA public key and encode it with base64.

    The encrypted password can only be decrypted by someone with the
    private key (in this case, only Travis).
Encrypt password using given RSA public key and encode it with base64.
Encrypt password using given RSA public key and encode it with base64 .
def encrypt(pubkey, password):
    """Encrypt password using given RSA public key and encode it with base64.

    The encrypted password can only be decrypted by someone with the
    private key (in this case, only Travis).
    """
    key = load_key(pubkey)
    encrypted_password = key.encrypt(password, PKCS1v15())
    return base64.b64encode(encrypted_password)
def encrypt ( pubkey , password ) : key = load_key ( pubkey ) encrypted_password = key . encrypt ( password , PKCS1v15 ( ) ) return base64 . b64encode ( encrypted_password )