Robot Framework library that generates hashes based on the given input
Project description
HashLibrary for Robot Framework®
HashLibrary is a library for Robot Framework that provides methods to generate various hashes from strings and files. It supports base64, crc32, md5, and sha256 hashes.
Installation
If you already have Python >= 3.8 with pip installed, you can simply run:
pip install robotframework-hashlibrary
Getting started
Here are some examples of how to import and use the library.
Importing the Library
*** Settings ***
Library HashLibrary
Variables
*** Variables ***
${TEST_STRING} david
${TEST_FILE} path/to/file.txt
Test Cases
Generate Base64 Hash for String
*** Test Cases ***
Generate Base64 Hash for String
${hash} Get Base64 Hash From String ${TEST_STRING}
Should Be Equal ${hash} ZGF2aWQ=
Generate CRC32 Hash for String
*** Test Cases ***
Generate CRC32 Hash for String
${hash} Get Crc32 Hash From String ${TEST_STRING}
Should Be Equal ${hash} 0x8796d7bb
Generate MD5 Hash for String
*** Test Cases ***
Generate MD5 Hash for String
${hash} Get md5 Hash From String ${TEST_STRING}
Should Be Equal ${hash} 172522ec1028ab781d9dfd17eaca4427
Generate SHA256 Hash for File
*** Test Cases ***
Generate SHA256 Hash for File
${hash} Get Sha256 Hash From File ${TEST_FILE}
Should Be Equal ${hash} <expected_sha256_hash>
Generate Base64 Hash for File
*** Test Cases ***
Generate Base64 Hash for File
${hash} Get Base64 Hash From File ${TEST_FILE}
Should Be Equal ${hash} <expected_base64_hash>
Generate CRC32 Hash for File
*** Test Cases ***
Generate CRC32 Hash for File
${hash} Get Crc32 Hash From File ${TEST_FILE}
Should Be Equal ${hash} <expected_crc32_hash>
Generate MD5 Hash for File
*** Test Cases ***
Generate MD5 Hash for File
${hash} Get md5 Hash From File ${TEST_FILE}
Should Be Equal ${hash} <expected_md5_hash>
Contributing
If you would like to contribute to this project, please fork the repository and submit a pull request. We welcome all contributions!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file robotframework_hashlibrary-0.4.tar.gz.
File metadata
- Download URL: robotframework_hashlibrary-0.4.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91e8cb742e0a6e2a4afc920ec311a1e2a2ec0622abe036baf05f973563632a2f
|
|
| MD5 |
08fc85de0e929eb5414713c001f16cc3
|
|
| BLAKE2b-256 |
7da44d50b11b5cade24d23e54b15a119f0ede24bc0f8d67bf74c30fbfbad1eae
|
File details
Details for the file robotframework_hashlibrary-0.4-py3-none-any.whl.
File metadata
- Download URL: robotframework_hashlibrary-0.4-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e106b2831f3587a4613a308ef30291fa4f47ed5a10c34ddbf2cc969c97d55c64
|
|
| MD5 |
a548aba53044c17226e0630e31185ab1
|
|
| BLAKE2b-256 |
833ac6cc9e077f95a8e25a86c4b7a768b80ede5ce3abba7051915942df4e6632
|