Skip to main content

CryptoLibrary is a library for secure password handling. project page

For more information about Robot Framework, see http://robotframework.org.


Installation

If you already have Python >= 3.6 with pip installed, you can simply run:

pip install --upgrade robotframework-crypto

or if you have Python 2 and 3 installed in parallel you may use

pip3 install --upgrade robotframework-crypto

If you have Python 2 … i am very sorry! Please update!


How it works

CryptoLibrary uses asymmetric crypto with elliptic curve cryptography to store confidential data securely.

With python -m CryptoLibrary you can generate a key pair (private and public key) for your test env. You will get the public key after generating.

this public key can now be used to encrypt every data you do not want to be public. Passwords, personal data, etc.

you can use python -m CryptoClient on you computer where you want to encrypt data. Encrypted Data will look like this:

tIdr5s65+ggfJZl46pJgljioCUePUdZLozgiwquznw+xSlmzT3dcvfrTL9wIdRwmNOJuONT7FBW5

this encrypted data can now be decrypted with CryptoLibrary within RobotFramework.

CryptoLibrary need the private_key_store.json for this. This is what is generated as key pair. Private key can be imported in test env with python -m CryptoLibrary .


Suppressing encrypted Text from Logs

All Data that is decrypted by CryptoLibrary is replaced in the log by *** This works always and can not be disabled. No need to use special keywords for this.


Usage in Test

*** Settings ***
Resource    imports.resource
Library     CryptoLibrary    ${decryption_password}    #private key which should be secret is also protected by a password

*** Variables ***
${secret}=     KILL ALL HUMANS!!!
${enc_user}=   nkpEPOVKfOko3t04XxOupA+F/ANTEuR9aQuPaPeMBGBQenwYf6UNESEl9MWRKGuj60ZWd10=
${enc_pwd}=    TVpamLXCtrzRsl8UAgD0YuoY+lSJNV73+bTYhOP51zM1GQihgyCvSZ2CoGoKsUHLFjokyJLHxFzPEB4=

*** Test Cases ***
Valid Login
    Open Browser    ${BASE-URL}
    Suppress Logging                                  #disable Robot Framework logging
    ${var}=    set Variable   ${secret}
    Log    ${var}
    Suppress Logging    False                         #disable Robot Framework logging
    Decrypt Text To Variable    user    ${enc_user}   #puts the decrypted pain text into ${user}
    ${var2}=    set Variable    ${user}
    log    ${var2}
    Input Text      id:input_username    ${user}
    ${password}=    Get Decrypted Text    ${enc_pwd}  #decrypts cipher text and returns plain text
    Input Password    id:input_password    ${password}
    Click Button    id:button_login
    Page Should Contain Element    //a[text()='Logout']
    Location Should Be    ${BASE-URL}list
    [Teardown]   Close Browser

in this case the decryption password for the private key. It can also be saved on test env persistently as a hash.

THIS IS JUST AN ALPHA VERSION !!11!!1

Release files for robotframework-crypto 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for robotframework-crypto 0.0.2
File Size Uploaded
robotframework-crypto-0.0.2.tar.gz 59.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for robotframework-crypto 0.0.2
File Interpreter ABI Platform
robotframework_crypto-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 76.9 kB

Release files / robotframework-crypto-0.0.2.tar.gz

Download URL robotframework-crypto-0.0.2.tar.gz
Size 59.5 kB
Tags Source
SHA-256 checksum
How to use checksums
bfe68e47d6e9b92a288d4b64b889ddfced69d660dcbea9f62373a9e1a967cf63
BLAKE2b-256 checksum
How to use checksums
5e9c72411250605cfd1d9ea30c35f6a6228842bc65f9d83e12339a6229f75274
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.7.3

Release files / robotframework_crypto-0.0.2-py3-none-any.whl

Download URL robotframework_crypto-0.0.2-py3-none-any.whl
Size 17.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
827b90acec7d157be11c46d75cfb6fb4a782c1c9ebf3bfbd196d143cc4e4ed86
BLAKE2b-256 checksum
How to use checksums
26263d87e4ff9e77b11563f91757586b02620d8a0137b2fc337501ce7f3748c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.18.4 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.7.3

Release history Release notifications | RSS feed

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

This release

0.0.2 This release

2 release files

0.0.1

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page