Just another Python API for Travis CI (API).
A module which provides the interface for the encryption of data for or within the Travis CI infrastructure.
- Nissar Chababy, @funilrys, contactTATAfunilrysTODTODcom
- Project link:
- Project documentation:
MIT License Copyright (c) 2019, 2020 Nissar Chababy Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FileEncryption(*, key: Union[str, bytes, None] = None, iv: Union[str, bytes, None] = None)¶
Provides the interface for the encryption of files for or within the Travis CI infrastructure.
- key – The key to use to encrypt the file.
- iv – The IV to use to encrypt the file.
Ensures that the keys exists before any decryption.
Ensures that the keys exists before any encryption.
generate_iv(*, save: bool = True) → bytes¶
Generate a new IV key.
Parameters: save – Dis-authorize the saving into the global iv attribute.
generate_key(*, save: bool = True) → bytes¶
Generates a new key.
Parameters: save – Dis-authorize the saving into the global key attribute.
get_iv() → Optional[bytes]¶
Provides the hexadecimal representation of the currently set iv.
get_key() → Optional[bytes]¶
Provides the hexadecimal representation of the currently set key.
set_iv(value: Union[str, bytes]) → None¶
Sets the IV to use.
Raises: ValueError – When the size of the given key is not correct.