From 97357d124a2cb70113acd4b6e6d4419cb4fb1f8c Mon Sep 17 00:00:00 2001 From: Date: Mon, 27 Jun 2022 18:06:06 -0500 Subject: [PATCH] Update documentation --- .pages | 4 + README.md | 94 +++++ attachment.md | 95 +++++ baseelement.md | 163 ++++++++ entry.md | 729 ++++++++++++++++++++++++++++++++++ exceptions.md | 81 ++++ group.md | 189 +++++++++ icons.md | 87 ++++ kdbx_parsing.common.md | 495 +++++++++++++++++++++++ kdbx_parsing.kdbx.md | 16 + kdbx_parsing.kdbx3.md | 31 ++ kdbx_parsing.kdbx4.md | 57 +++ kdbx_parsing.md | 86 ++++ kdbx_parsing.pytwofish.md | 343 ++++++++++++++++ kdbx_parsing.twofish.md | 397 +++++++++++++++++++ pykeepass.md | 809 ++++++++++++++++++++++++++++++++++++++ setters.md | 75 ++++ version.md | 16 + xpath.md | 22 ++ 19 files changed, 3789 insertions(+) create mode 100644 .pages create mode 100644 README.md create mode 100644 attachment.md create mode 100644 baseelement.md create mode 100644 entry.md create mode 100644 exceptions.md create mode 100644 group.md create mode 100644 icons.md create mode 100644 kdbx_parsing.common.md create mode 100644 kdbx_parsing.kdbx.md create mode 100644 kdbx_parsing.kdbx3.md create mode 100644 kdbx_parsing.kdbx4.md create mode 100644 kdbx_parsing.md create mode 100644 kdbx_parsing.pytwofish.md create mode 100644 kdbx_parsing.twofish.md create mode 100644 pykeepass.md create mode 100644 setters.md create mode 100644 version.md create mode 100644 xpath.md diff --git a/.pages b/.pages new file mode 100644 index 00000000..db48efa2 --- /dev/null +++ b/.pages @@ -0,0 +1,4 @@ +title: API Reference +nav: + - Overview: README.md + - ... diff --git a/README.md b/README.md new file mode 100644 index 00000000..f0ac88e5 --- /dev/null +++ b/README.md @@ -0,0 +1,94 @@ + + +# API Overview + +## Modules + +- [`attachment`](./attachment.md#module-attachment) +- [`baseelement`](./baseelement.md#module-baseelement) +- [`entry`](./entry.md#module-entry) +- [`exceptions`](./exceptions.md#module-exceptions) +- [`group`](./group.md#module-group) +- [`icons`](./icons.md#module-icons) +- [`kdbx_parsing`](./kdbx_parsing.md#module-kdbx_parsing) +- [`kdbx_parsing.common`](./kdbx_parsing.common.md#module-kdbx_parsingcommon) +- [`kdbx_parsing.kdbx`](./kdbx_parsing.kdbx.md#module-kdbx_parsingkdbx) +- [`kdbx_parsing.kdbx3`](./kdbx_parsing.kdbx3.md#module-kdbx_parsingkdbx3) +- [`kdbx_parsing.kdbx4`](./kdbx_parsing.kdbx4.md#module-kdbx_parsingkdbx4) +- [`kdbx_parsing.pytwofish`](./kdbx_parsing.pytwofish.md#module-kdbx_parsingpytwofish) +- [`kdbx_parsing.twofish`](./kdbx_parsing.twofish.md#module-kdbx_parsingtwofish) +- [`pykeepass`](./pykeepass.md#module-pykeepass) +- [`setters`](./setters.md#module-setters) +- [`version`](./version.md#module-version) +- [`xpath`](./xpath.md#module-xpath) + +## Classes + +- [`attachment.Attachment`](./attachment.md#class-attachment) +- [`baseelement.BaseElement`](./baseelement.md#class-baseelement): Entry and Group inherit from this class +- [`entry.Entry`](./entry.md#class-entry) +- [`entry.HistoryEntry`](./entry.md#class-historyentry) +- [`exceptions.BinaryError`](./exceptions.md#class-binaryerror) +- [`exceptions.CredentialsError`](./exceptions.md#class-credentialserror) +- [`exceptions.HeaderChecksumError`](./exceptions.md#class-headerchecksumerror) +- [`exceptions.PayloadChecksumError`](./exceptions.md#class-payloadchecksumerror) +- [`exceptions.UnableToSendToRecycleBin`](./exceptions.md#class-unabletosendtorecyclebin) +- [`group.Group`](./group.md#class-group) +- [`common.AES256Payload`](./kdbx_parsing.common.md#class-aes256payload) +- [`common.ARCFourVariantStream`](./kdbx_parsing.common.md#class-arcfourvariantstream) +- [`common.ChaCha20Payload`](./kdbx_parsing.common.md#class-chacha20payload) +- [`common.ChaCha20Stream`](./kdbx_parsing.common.md#class-chacha20stream) +- [`common.Concatenated`](./kdbx_parsing.common.md#class-concatenated): Data Blocks <---> Bytes +- [`common.CredentialsError`](./kdbx_parsing.common.md#class-credentialserror) +- [`common.Decompressed`](./kdbx_parsing.common.md#class-decompressed): Compressed Bytes <---> Decompressed Bytes +- [`common.DecryptedPayload`](./kdbx_parsing.common.md#class-decryptedpayload): Encrypted Bytes <---> Decrypted Bytes +- [`common.DynamicDict`](./kdbx_parsing.common.md#class-dynamicdict): ListContainer <---> Container +- [`common.HeaderChecksumError`](./kdbx_parsing.common.md#class-headerchecksumerror) +- [`common.PayloadChecksumError`](./kdbx_parsing.common.md#class-payloadchecksumerror) +- [`common.Salsa20Stream`](./kdbx_parsing.common.md#class-salsa20stream) +- [`common.TwoFishPayload`](./kdbx_parsing.common.md#class-twofishpayload) +- [`common.UnprotectedStream`](./kdbx_parsing.common.md#class-unprotectedstream): lxml etree <---> unprotected lxml etree +- [`common.XML`](./kdbx_parsing.common.md#class-xml): Bytes <---> lxml etree +- [`pytwofish.TWI`](./kdbx_parsing.pytwofish.md#class-twi) +- [`pytwofish.Twofish`](./kdbx_parsing.pytwofish.md#class-twofish) +- [`twofish.BlockCipher`](./kdbx_parsing.twofish.md#class-blockcipher): Base class for all blockciphers +- [`twofish.CBC`](./kdbx_parsing.twofish.md#class-cbc): CBC chaining mode +- [`twofish.python_Twofish`](./kdbx_parsing.twofish.md#class-python_twofish) +- [`twofish.python_Twofish`](./kdbx_parsing.twofish.md#class-python_twofish) +- [`pykeepass.PyKeePass`](./pykeepass.md#class-pykeepass): Open a KeePass database + +## Functions + +- [`common.Reparsed`](./kdbx_parsing.common.md#function-reparsed) +- [`common.Unprotect`](./kdbx_parsing.common.md#function-unprotect): Select stream cipher based on protected_stream_id +- [`common.aes_kdf`](./kdbx_parsing.common.md#function-aes_kdf): Set up a context for AES128-ECB encryption to find transformed_key +- [`common.compute_key_composite`](./kdbx_parsing.common.md#function-compute_key_composite): Compute composite key. +- [`common.compute_master`](./kdbx_parsing.common.md#function-compute_master): Computes master key from transformed key and master seed. +- [`kdbx3.compute_transformed`](./kdbx_parsing.kdbx3.md#function-compute_transformed): Compute transformed key for opening database +- [`kdbx4.compute_header_hmac_hash`](./kdbx_parsing.kdbx4.md#function-compute_header_hmac_hash): Compute HMAC-SHA256 hash of header. +- [`kdbx4.compute_payload_block_hash`](./kdbx_parsing.kdbx4.md#function-compute_payload_block_hash): Compute hash of each payload block. +- [`kdbx4.compute_transformed`](./kdbx_parsing.kdbx4.md#function-compute_transformed): Compute transformed key for opening database +- [`pytwofish.byte`](./kdbx_parsing.pytwofish.md#function-byte) +- [`pytwofish.byteswap32`](./kdbx_parsing.pytwofish.md#function-byteswap32) +- [`pytwofish.decrypt`](./kdbx_parsing.pytwofish.md#function-decrypt) +- [`pytwofish.encrypt`](./kdbx_parsing.pytwofish.md#function-encrypt) +- [`pytwofish.gen_mk_tab`](./kdbx_parsing.pytwofish.md#function-gen_mk_tab) +- [`pytwofish.gen_mtab`](./kdbx_parsing.pytwofish.md#function-gen_mtab) +- [`pytwofish.gen_qtab`](./kdbx_parsing.pytwofish.md#function-gen_qtab) +- [`pytwofish.h_fun`](./kdbx_parsing.pytwofish.md#function-h_fun) +- [`pytwofish.mds_rem`](./kdbx_parsing.pytwofish.md#function-mds_rem) +- [`pytwofish.qp`](./kdbx_parsing.pytwofish.md#function-qp) +- [`pytwofish.rotl32`](./kdbx_parsing.pytwofish.md#function-rotl32) +- [`pytwofish.rotr32`](./kdbx_parsing.pytwofish.md#function-rotr32) +- [`pytwofish.set_key`](./kdbx_parsing.pytwofish.md#function-set_key) +- [`pykeepass.create_database`](./pykeepass.md#function-create_database) +- [`pykeepass.debug_setup`](./pykeepass.md#function-debug_setup): Convenience function to quickly enable debug messages +- [`setters.get_text`](./setters.md#function-get_text) +- [`setters.get_time`](./setters.md#function-get_time) +- [`setters.set_text`](./setters.md#function-set_text) +- [`setters.set_time`](./setters.md#function-set_time) + + +--- + +_This file was automatically generated via [lazydocs](https://github.com/ml-tooling/lazydocs)._ diff --git a/attachment.md b/attachment.md new file mode 100644 index 00000000..2ec27985 --- /dev/null +++ b/attachment.md @@ -0,0 +1,95 @@ + + + + +# module `attachment` + + + + + + +--- + + + +## class `Attachment` + + + + + + +### method `__init__` + +```python +__init__(element=None, kp=None, id=None, filename=None) +``` + + + + + + +--- + +#### property binary + + + + + +--- + +#### property data + + + + + +--- + +#### property entry + + + + + +--- + +#### property filename + + + + + +--- + +#### property id + + + + + + + +--- + + + +### method `delete` + +```python +delete() +``` + + + + + + + + +--- + +_This file was automatically generated via [lazydocs](https://github.com/ml-tooling/lazydocs)._ diff --git a/baseelement.md b/baseelement.md new file mode 100644 index 00000000..8cb035a9 --- /dev/null +++ b/baseelement.md @@ -0,0 +1,163 @@ + + + + +# module `baseelement` + + + + + + +--- + + + +## class `BaseElement` +Entry and Group inherit from this class + + + +### method `__init__` + +```python +__init__(element, kp=None, icon=None, expires=False, expiry_time=None) +``` + + + + + + +--- + +#### property atime + + + + + +--- + +#### property ctime + + + + + +--- + +#### property expired + + + + + +--- + +#### property expires + + + + + +--- + +#### property expiry_time + + + + + +--- + +#### property group + + + + + +--- + +#### property icon + + + + + +--- + +#### property mtime + + + + + +--- + +#### property parentgroup + + + + + +--- + +#### property uuid + +Returns uuid of this element as a uuid.UUID object + + + +--- + + + +### method `delete` + +```python +delete() +``` + + + + + +--- + + + +### method `dump_xml` + +```python +dump_xml(pretty_print=False) +``` + + + + + +--- + + + +### method `touch` + +```python +touch(modify=False) +``` + +Update last access time of an entry/group + + + +**Args:** + + - `modify` (bool): update access time as well a modification time + + + + +--- + +_This file was automatically generated via [lazydocs](https://github.com/ml-tooling/lazydocs)._ diff --git a/entry.md b/entry.md new file mode 100644 index 00000000..3c3dd83f --- /dev/null +++ b/entry.md @@ -0,0 +1,729 @@ + + + + +# module `entry` + + + + +**Global Variables** +--------------- +- **reserved_keys** + + +--- + + + +## class `Entry` + + + + + + +### method `__init__` + +```python +__init__( + title=None, + username=None, + password=None, + url=None, + notes=None, + otp=None, + tags=None, + expires=False, + expiry_time=None, + icon=None, + autotype_sequence=None, + autotype_enabled=True, + element=None, + kp=None +) +``` + + + + + + +--- + +#### property atime + + + + + +--- + +#### property attachments + + + + + +--- + +#### property autotype_enabled + + + + + +--- + +#### property autotype_sequence + + + + + +--- + +#### property ctime + + + + + +--- + +#### property custom_properties + + + + + +--- + +#### property expired + + + + + +--- + +#### property expires + + + + + +--- + +#### property expiry_time + + + + + +--- + +#### property group + + + + + +--- + +#### property history + + + + + +--- + +#### property icon + + + + + +--- + +#### property is_a_history_entry + + + + + +--- + +#### property mtime + + + + + +--- + +#### property notes + + + + + +--- + +#### property otp + + + + + +--- + +#### property parentgroup + + + + + +--- + +#### property password + + + + + +--- + +#### property path + +Path to element as list. List contains all parent group names ending with entry title. List may contain strings or NoneTypes. + +--- + +#### property tags + + + + + +--- + +#### property title + + + + + +--- + +#### property url + + + + + +--- + +#### property username + + + + + +--- + +#### property uuid + +Returns uuid of this element as a uuid.UUID object + + + +--- + + + +### method `add_attachment` + +```python +add_attachment(id, filename) +``` + + + + + +--- + + + +### method `delete_attachment` + +```python +delete_attachment(attachment) +``` + + + + + +--- + + + +### method `delete_custom_property` + +```python +delete_custom_property(key) +``` + + + + + +--- + + + +### method `delete_history` + +```python +delete_history(history_entry=None, all=False) +``` + +Delete entries from history + + + +**Args:** + + - `history_entry` (Entry): history item to delete + - `all` (bool): delete all entries from history. Default is False + +--- + + + +### method `deref` + +```python +deref(attribute) +``` + + + + + +--- + + + +### method `get_custom_property` + +```python +get_custom_property(key) +``` + + + + + +--- + + + +### method `ref` + +```python +ref(attribute) +``` + +Create reference to an attribute of this element. + +--- + + + +### method `save_history` + +```python +save_history() +``` + +Save the entry in its history + +--- + + + +### method `set_custom_property` + +```python +set_custom_property(key, value) +``` + + + + + + +--- + + + +## class `HistoryEntry` + + + + + + +### method `__init__` + +```python +__init__( + title=None, + username=None, + password=None, + url=None, + notes=None, + otp=None, + tags=None, + expires=False, + expiry_time=None, + icon=None, + autotype_sequence=None, + autotype_enabled=True, + element=None, + kp=None +) +``` + + + + + + +--- + +#### property atime + + + + + +--- + +#### property attachments + + + + + +--- + +#### property autotype_enabled + + + + + +--- + +#### property autotype_sequence + + + + + +--- + +#### property ctime + + + + + +--- + +#### property custom_properties + + + + + +--- + +#### property expired + + + + + +--- + +#### property expires + + + + + +--- + +#### property expiry_time + + + + + +--- + +#### property group + + + + + +--- + +#### property history + + + + + +--- + +#### property icon + + + + + +--- + +#### property is_a_history_entry + + + + + +--- + +#### property mtime + + + + + +--- + +#### property notes + + + + + +--- + +#### property otp + + + + + +--- + +#### property parentgroup + + + + + +--- + +#### property password + + + + + +--- + +#### property path + +Path to element as list. List contains all parent group names ending with entry title. List may contain strings or NoneTypes. + +--- + +#### property tags + + + + + +--- + +#### property title + + + + + +--- + +#### property url + + + + + +--- + +#### property username + + + + + +--- + +#### property uuid + +Returns uuid of this element as a uuid.UUID object + + + +--- + + + +### method `add_attachment` + +```python +add_attachment(id, filename) +``` + + + + + +--- + + + +### method `delete_attachment` + +```python +delete_attachment(attachment) +``` + + + + + +--- + + + +### method `delete_custom_property` + +```python +delete_custom_property(key) +``` + + + + + +--- + + + +### method `delete_history` + +```python +delete_history(history_entry=None, all=False) +``` + +Delete entries from history + + + +**Args:** + + - `history_entry` (Entry): history item to delete + - `all` (bool): delete all entries from history. Default is False + +--- + + + +### method `deref` + +```python +deref(attribute) +``` + + + + + +--- + + + +### method `get_custom_property` + +```python +get_custom_property(key) +``` + + + + + +--- + + + +### method `ref` + +```python +ref(attribute) +``` + +Create reference to an attribute of this element. + +--- + + + +### method `save_history` + +```python +save_history() +``` + +Save the entry in its history + +--- + + + +### method `set_custom_property` + +```python +set_custom_property(key, value) +``` + + + + + + + + +--- + +_This file was automatically generated via [lazydocs](https://github.com/ml-tooling/lazydocs)._ diff --git a/exceptions.md b/exceptions.md new file mode 100644 index 00000000..7ef9e8c5 --- /dev/null +++ b/exceptions.md @@ -0,0 +1,81 @@ + + + + +# module `exceptions` + + + + + + +--- + + + +## class `CredentialsError` + + + + + + + + +--- + + + +## class `PayloadChecksumError` + + + + + + + + +--- + + + +## class `HeaderChecksumError` + + + + + + + + +--- + + + +## class `BinaryError` + + + + + + + + +--- + + + +## class `UnableToSendToRecycleBin` + + + + + + + + + + +--- + +_This file was automatically generated via [lazydocs](https://github.com/ml-tooling/lazydocs)._ diff --git a/group.md b/group.md new file mode 100644 index 00000000..c64640e0 --- /dev/null +++ b/group.md @@ -0,0 +1,189 @@ + + + + +# module `group` + + + + + + +--- + + + +## class `Group` + + + + + + +### method `__init__` + +```python +__init__( + name=None, + element=None, + icon=None, + notes=None, + kp=None, + expires=None, + expiry_time=None +) +``` + + + + + + +--- + +#### property atime + + + + + +--- + +#### property ctime + + + + + +--- + +#### property entries + + + + + +--- + +#### property expired + + + + + +--- + +#### property expires + + + + + +--- + +#### property expiry_time + + + + + +--- + +#### property group + + + + + +--- + +#### property icon + + + + + +--- + +#### property is_root_group + + + + + +--- + +#### property mtime + + + + + +--- + +#### property name + + + + + +--- + +#### property notes + + + + + +--- + +#### property parentgroup + + + + + +--- + +#### property path + + + + + +--- + +#### property subgroups + + + + + +--- + +#### property uuid + +Returns uuid of this element as a uuid.UUID object + + + +--- + + + +### method `append` + +```python +append(entries) +``` + + + + + + + + +--- + +_This file was automatically generated via [lazydocs](https://github.com/ml-tooling/lazydocs)._ diff --git a/icons.md b/icons.md new file mode 100644 index 00000000..75c0d282 --- /dev/null +++ b/icons.md @@ -0,0 +1,87 @@ + + + + +# module `icons` + + + + +**Global Variables** +--------------- +- **KEY** +- **GLOBE** +- **WARNING_SIGN** +- **SERVER** +- **PINNED_NOTE** +- **SPEECH_BUBBLE** +- **SQUARES** +- **HANDWRITTEN_NOTE** +- **GLOBE_PLUG** +- **BUSINESS_CARD** +- **GREEN_AND_WHITE_THINGY** +- **CAMERA** +- **INFRARED** +- **KEYS** +- **POWER_PLUG** +- **FLATBED_SCANNER** +- **GLOBE_STAR** +- **CD_ROM** +- **MONITOR** +- **ENVELOPE** +- **GEAR** +- **CHECKLIST** +- **NOTEPAD** +- **DESKTOP** +- **POWER_FLASH** +- **FOLDER_ENVELOPE** +- **FLOPPY_DISK** +- **SERVER_2** +- **GREEN_DOT** +- **MONITOR_KEY** +- **SHELL** +- **PRINTER** +- **DASHBOARD** +- **CROATIA** +- **WRENCH** +- **PC_INTERNET** +- **ZIP_FILE** +- **PERCENT_SIGN** +- **SAMBA_SHARE** +- **CLOCK** +- **SEARCH** +- **USED_TAMPON** +- **MEMORY_STICK** +- **RECYCLE_BIN** +- **POST_IT** +- **RED_CROSS** +- **INFO_SIGN** +- **CARDBOARD** +- **FOLDER** +- **FOLDER_OPEN** +- **FOLDER_CUBE** +- **LOCK_OPEN** +- **LOCK_CLOSED** +- **GREEN_CHECKMARK** +- **FEATHER_PEN** +- **POLAROID_PICTURE** +- **BOOK_OPENED** +- **UI** +- **MANAGER** +- **HAMMER** +- **HOUSE** +- **STAR** +- **PENGUIN** +- **FEATHER** +- **APPLE** +- **WIKIPEDIA** +- **DOLLAR_SIGN** +- **CERTIFICATE** +- **SMARTPHONE** + + + + +--- + +_This file was automatically generated via [lazydocs](https://github.com/ml-tooling/lazydocs)._ diff --git a/kdbx_parsing.common.md b/kdbx_parsing.common.md new file mode 100644 index 00000000..148b19ec --- /dev/null +++ b/kdbx_parsing.common.md @@ -0,0 +1,495 @@ + + + + +# module `kdbx_parsing.common` + + + + + +--- + + + +## function `Reparsed` + +```python +Reparsed(subcon_out) +``` + + + + + + +--- + + + +## function `aes_kdf` + +```python +aes_kdf(key, rounds, key_composite) +``` + +Set up a context for AES128-ECB encryption to find transformed_key + + +--- + + + +## function `compute_key_composite` + +```python +compute_key_composite(password=None, keyfile=None) +``` + +Compute composite key. Used in header verification and payload decryption. + + +--- + + + +## function `compute_master` + +```python +compute_master(context) +``` + +Computes master key from transformed key and master seed. Used in payload decryption. + + +--- + + + +## function `Unprotect` + +```python +Unprotect(protected_stream_id, protected_stream_key, subcon) +``` + +Select stream cipher based on protected_stream_id + + +--- + + + +## class `HeaderChecksumError` + + + + + + + + +--- + + + +## class `CredentialsError` + + + + + + + + +--- + + + +## class `PayloadChecksumError` + + + + + + + + +--- + + + +## class `DynamicDict` +ListContainer <---> Container Convenience mapping so we dont have to iterate ListContainer to find the right item + +FIXME: lump kwarg was added to get around the fact that InnerHeader is not truly a dict. We lump all 'binary' InnerHeaderItems into a single list + + + +### method `__init__` + +```python +__init__(key, subcon, lump=[]) +``` + + + + + + + + + +--- + + + +## class `XML` +Bytes <---> lxml etree + + + + + +--- + + + +## class `UnprotectedStream` +lxml etree <---> unprotected lxml etree Iterate etree for Protected elements and decrypt using cipher provided by get_cipher + + + +### method `__init__` + +```python +__init__(protected_stream_key, subcon) +``` + + + + + + + + + +--- + + + +## class `ARCFourVariantStream` + + + + + + +### method `__init__` + +```python +__init__(protected_stream_key, subcon) +``` + + + + + + + + +--- + + + +### method `get_cipher` + +```python +get_cipher(protected_stream_key) +``` + + + + + + +--- + + + +## class `Salsa20Stream` + + + + + + +### method `__init__` + +```python +__init__(protected_stream_key, subcon) +``` + + + + + + + + +--- + + + +### method `get_cipher` + +```python +get_cipher(protected_stream_key) +``` + + + + + + +--- + + + +## class `ChaCha20Stream` + + + + + + +### method `__init__` + +```python +__init__(protected_stream_key, subcon) +``` + + + + + + + + +--- + + + +### method `get_cipher` + +```python +get_cipher(protected_stream_key) +``` + + + + + + +--- + + + +## class `Concatenated` +Data Blocks <---> Bytes + + + + + +--- + + + +## class `DecryptedPayload` +Encrypted Bytes <---> Decrypted Bytes + + + + + +--- + + + +## class `AES256Payload` + + + + + + + +--- + + + +### method `get_cipher` + +```python +get_cipher(master_key, encryption_iv) +``` + + + + + +--- + + + +### method `pad` + +```python +pad(data) +``` + + + + + +--- + + + +### method `unpad` + +```python +unpad(data) +``` + + + + + + +--- + + + +## class `ChaCha20Payload` + + + + + + + +--- + + + +### method `get_cipher` + +```python +get_cipher(master_key, encryption_iv) +``` + + + + + +--- + + + +### method `pad` + +```python +pad(data) +``` + + + + + +--- + + + +### method `unpad` + +```python +unpad(data) +``` + + + + + + +--- + + + +## class `TwoFishPayload` + + + + + + + +--- + + + +### method `get_cipher` + +```python +get_cipher(master_key, encryption_iv) +``` + + + + + +--- + + + +### method `pad` + +```python +pad(data) +``` + + + + + +--- + + + +### method `unpad` + +```python +unpad(data) +``` + + + + + + +--- + + + +## class `Decompressed` +Compressed Bytes <---> Decompressed Bytes + + + + + + + +--- + +_This file was automatically generated via [lazydocs](https://github.com/ml-tooling/lazydocs)._ diff --git a/kdbx_parsing.kdbx.md b/kdbx_parsing.kdbx.md new file mode 100644 index 00000000..a011cb46 --- /dev/null +++ b/kdbx_parsing.kdbx.md @@ -0,0 +1,16 @@ + + + + +# module `kdbx_parsing.kdbx` + + + + + + + + +--- + +_This file was automatically generated via [lazydocs](https://github.com/ml-tooling/lazydocs)._ diff --git a/kdbx_parsing.kdbx3.md b/kdbx_parsing.kdbx3.md new file mode 100644 index 00000000..b0b1a540 --- /dev/null +++ b/kdbx_parsing.kdbx3.md @@ -0,0 +1,31 @@ + + + + +# module `kdbx_parsing.kdbx3` + + + + +**Global Variables** +--------------- +- **kdf_uuids** + +--- + + + +## function `compute_transformed` + +```python +compute_transformed(context) +``` + +Compute transformed key for opening database + + + + +--- + +_This file was automatically generated via [lazydocs](https://github.com/ml-tooling/lazydocs)._ diff --git a/kdbx_parsing.kdbx4.md b/kdbx_parsing.kdbx4.md new file mode 100644 index 00000000..717f0bc6 --- /dev/null +++ b/kdbx_parsing.kdbx4.md @@ -0,0 +1,57 @@ + + + + +# module `kdbx_parsing.kdbx4` + + + + +**Global Variables** +--------------- +- **kdf_uuids** + +--- + + + +## function `compute_transformed` + +```python +compute_transformed(context) +``` + +Compute transformed key for opening database + + +--- + + + +## function `compute_header_hmac_hash` + +```python +compute_header_hmac_hash(context) +``` + +Compute HMAC-SHA256 hash of header. Used to prevent header tampering. + + +--- + + + +## function `compute_payload_block_hash` + +```python +compute_payload_block_hash(this) +``` + +Compute hash of each payload block. Used to prevent payload corruption and tampering. + + + + +--- + +_This file was automatically generated via [lazydocs](https://github.com/ml-tooling/lazydocs)._ diff --git a/kdbx_parsing.md b/kdbx_parsing.md new file mode 100644 index 00000000..bb9545d1 --- /dev/null +++ b/kdbx_parsing.md @@ -0,0 +1,86 @@ + + + + +# module `kdbx_parsing` + + + + +**Global Variables** +--------------- +- **pytwofish**: ## twofish.py - pure Python implementation of the Twofish algorithm. +## Bjorn Edstrom 13 december 2007. +## +## Copyrights +## ========== +## +## This code is a derived from an implementation by Dr Brian Gladman +## (gladman@seven77.demon.co.uk) which is subject to the following license. +## This Python implementation is not subject to any other license. +## +##/* This is an independent implementation of the encryption algorithm: */ +##/* */ +##/* Twofish by Bruce Schneier and colleagues */ +##/* */ +##/* which is a candidate algorithm in the Advanced Encryption Standard */ +##/* programme of the US National Institute of Standards and Technology. */ +##/* */ +##/* Copyright in this implementation is held by Dr B R Gladman but I */ +##/* hereby give permission for its free direct or derivative use subject */ +##/* to acknowledgment of its origin and compliance with any conditions */ +##/* that the originators of t he algorithm place on its exploitation. */ +##/* */ +##/* My thanks to Doug Whiting and Niels Ferguson for comments that led */ +##/* to improvements in this implementation. */ +##/* */ +##/* Dr Brian Gladman (gladman@seven77.demon.co.uk) 14th January 1999 */ +## +## The above copyright notice must not be removed. +## +## Information +## =========== +## +## Anyone thinking of using this code should reconsider. It's slow. +## Try python-mcrypt instead. In case a faster library is not installed +## on the target system, this code can be used as a portable fallback. + +- **twofish**: # ============================================================================= +# Copyright (c) 2008 Christophe Oosterlynck +# & NXP ( Philippe Teuwen ) +# +# 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. +# ============================================================================= +# -*- coding: utf-8 -*- + +- **common** +- **kdbx3**: # Evan Widloski - 2018-04-11 +# keepass decrypt experimentation + +- **kdbx4**: # Evan Widloski - 2018-04-11 +# keepass decrypt experimentation + +- **kdbx** + + + + +--- + +_This file was automatically generated via [lazydocs](https://github.com/ml-tooling/lazydocs)._ diff --git a/kdbx_parsing.pytwofish.md b/kdbx_parsing.pytwofish.md new file mode 100644 index 00000000..cf3cee72 --- /dev/null +++ b/kdbx_parsing.pytwofish.md @@ -0,0 +1,343 @@ + + + + +# module `kdbx_parsing.pytwofish` + + + + +**Global Variables** +--------------- +- **block_size** +- **key_size** +- **WORD_BIGENDIAN** +- **tab_5b** +- **tab_ef** +- **ror4** +- **ashx** +- **qt0** +- **qt1** +- **qt2** +- **qt3** + +--- + + + +## function `rotr32` + +```python +rotr32(x, n) +``` + + + + + + +--- + + + +## function `rotl32` + +```python +rotl32(x, n) +``` + + + + + + +--- + + + +## function `byteswap32` + +```python +byteswap32(x) +``` + + + + + + +--- + + + +## function `byte` + +```python +byte(x, n) +``` + + + + + + +--- + + + +## function `qp` + +```python +qp(n, x) +``` + + + + + + +--- + + + +## function `gen_qtab` + +```python +gen_qtab(pkey) +``` + + + + + + +--- + + + +## function `gen_mtab` + +```python +gen_mtab(pkey) +``` + + + + + + +--- + + + +## function `gen_mk_tab` + +```python +gen_mk_tab(pkey, key) +``` + + + + + + +--- + + + +## function `h_fun` + +```python +h_fun(pkey, x, key) +``` + + + + + + +--- + + + +## function `mds_rem` + +```python +mds_rem(p0, p1) +``` + + + + + + +--- + + + +## function `set_key` + +```python +set_key(pkey, in_key, key_len) +``` + + + + + + +--- + + + +## function `encrypt` + +```python +encrypt(pkey, in_blk) +``` + + + + + + +--- + + + +## function `decrypt` + +```python +decrypt(pkey, in_blk) +``` + + + + + + +--- + + + +## class `Twofish` + + + + + + +### method `__init__` + +```python +__init__(key=None) +``` + +Twofish. + + + + +--- + + + +### method `decrypt` + +```python +decrypt(block) +``` + +Decrypt blocks. + +--- + + + +### method `encrypt` + +```python +encrypt(block) +``` + +Encrypt blocks. + +--- + + + +### method `get_block_size` + +```python +get_block_size() +``` + +Get cipher block size in bytes. + +--- + + + +### method `get_key_size` + +```python +get_key_size() +``` + +Get cipher key size in bytes. + +--- + + + +### method `get_name` + +```python +get_name() +``` + +Return the name of the cipher. + +--- + + + +### method `set_key` + +```python +set_key(key) +``` + +Init. + + +--- + + + +## class `TWI` + + + + + + +### method `__init__` + +```python +__init__() +``` + + + + + + + + + + + +--- + +_This file was automatically generated via [lazydocs](https://github.com/ml-tooling/lazydocs)._ diff --git a/kdbx_parsing.twofish.md b/kdbx_parsing.twofish.md new file mode 100644 index 00000000..aa0020d8 --- /dev/null +++ b/kdbx_parsing.twofish.md @@ -0,0 +1,397 @@ + + + + +# module `kdbx_parsing.twofish` + + + + +**Global Variables** +--------------- +- **MODE_ECB** +- **MODE_CBC** +- **MODE_CFB** +- **MODE_OFB** +- **MODE_CTR** +- **MODE_XTS** +- **MODE_CMAC** + + +--- + + + +## class `BlockCipher` +Base class for all blockciphers + + + + + +### method `__init__` + +```python +__init__(key, mode, IV, counter, cipher_module, segment_size, args={}) +``` + + + + + + + + +--- + + + +### method `decrypt` + +```python +decrypt(ciphertext, n='') +``` + +Decrypt some ciphertext + + ciphertext = a string of binary data n = the 'tweak' value when the chaining mode is XTS + +The decrypt function will decrypt the supplied ciphertext. The behavior varies slightly depending on the chaining mode. + +ECB, CBC: +--------- When the supplied ciphertext is not a multiple of the blocksize of the cipher, then the remaining ciphertext will be cached. The next time the decrypt function is called with some ciphertext, the new ciphertext will be concatenated to the cache and then cache+ciphertext will be decrypted. + +CFB, OFB, CTR: +-------------- When the chaining mode allows the cipher to act as a stream cipher, the decrypt function will always decrypt all of the supplied ciphertext immediately. No cache will be kept. + +XTS: +---- Because the handling of the last two blocks is linked, it needs the whole block of ciphertext to be supplied at once. Every decrypt function called on a XTS cipher will output a decrypted block based on the current supplied ciphertext block. + +CMAC: +----- Mode not supported for decryption as this does not make sense. + +--- + + + +### method `encrypt` + +```python +encrypt(plaintext, n='') +``` + +Encrypt some plaintext + + plaintext = a string of binary data n = the 'tweak' value when the chaining mode is XTS + +The encrypt function will encrypt the supplied plaintext. The behavior varies slightly depending on the chaining mode. + +ECB, CBC: +--------- When the supplied plaintext is not a multiple of the blocksize of the cipher, then the remaining plaintext will be cached. The next time the encrypt function is called with some plaintext, the new plaintext will be concatenated to the cache and then cache+plaintext will be encrypted. + +CFB, OFB, CTR: +-------------- When the chaining mode allows the cipher to act as a stream cipher, the encrypt function will always encrypt all of the supplied plaintext immediately. No cache will be kept. + +XTS: +---- Because the handling of the last two blocks is linked, it needs the whole block of plaintext to be supplied at once. Every encrypt function called on a XTS cipher will output an encrypted block based on the current supplied plaintext block. + +CMAC: +----- Everytime the function is called, the hash from the input data is calculated. No finalizing needed. The hashlength is equal to block size of the used block cipher. + +--- + + + +### method `final` + +```python +final(style='pkcs7') +``` + +Finalizes the encryption by padding the cache + + padfct = padding function import from CryptoPlus.Util.padding + +For ECB, CBC: the remaining bytes in the cache will be padded and encrypted. For OFB,CFB, CTR: an encrypted padding will be returned, making the total outputed bytes since construction of the cipher a multiple of the blocksize of that cipher. + +If the cipher has been used for decryption, the final function won't do anything. You have to manually unpad if necessary. + +After finalization, the chain can still be used but the IV, counter etc aren't reset but just continue as they were after the last step (finalization step). + + +--- + + + +## class `CBC` +CBC chaining mode + + + + + +### method `__init__` + +```python +__init__(codebook, blocksize, IV) +``` + + + + + + + + +--- + + + +### method `update` + +```python +update(data, ed) +``` + +Processes the given ciphertext/plaintext + +Inputs: data: raw string of any length ed: 'e' for encryption, 'd' for decryption Output: processed raw string block(s), if any + +When the supplied data is not a multiple of the blocksize of the cipher, then the remaining input data will be cached. The next time the update function is called with some data, the new data will be concatenated to the cache and then cache+data will be processed and full blocks will be outputted. + + +--- + + + +## class `python_Twofish` + + + + + + +### method `__init__` + +```python +__init__(key, mode, IV, counter, segment_size) +``` + + + + + + + + +--- + + + +### method `decrypt` + +```python +decrypt(ciphertext, n='') +``` + +Decrypt some ciphertext + + ciphertext = a string of binary data n = the 'tweak' value when the chaining mode is XTS + +The decrypt function will decrypt the supplied ciphertext. The behavior varies slightly depending on the chaining mode. + +ECB, CBC: +--------- When the supplied ciphertext is not a multiple of the blocksize of the cipher, then the remaining ciphertext will be cached. The next time the decrypt function is called with some ciphertext, the new ciphertext will be concatenated to the cache and then cache+ciphertext will be decrypted. + +CFB, OFB, CTR: +-------------- When the chaining mode allows the cipher to act as a stream cipher, the decrypt function will always decrypt all of the supplied ciphertext immediately. No cache will be kept. + +XTS: +---- Because the handling of the last two blocks is linked, it needs the whole block of ciphertext to be supplied at once. Every decrypt function called on a XTS cipher will output a decrypted block based on the current supplied ciphertext block. + +CMAC: +----- Mode not supported for decryption as this does not make sense. + +--- + + + +### method `encrypt` + +```python +encrypt(plaintext, n='') +``` + +Encrypt some plaintext + + plaintext = a string of binary data n = the 'tweak' value when the chaining mode is XTS + +The encrypt function will encrypt the supplied plaintext. The behavior varies slightly depending on the chaining mode. + +ECB, CBC: +--------- When the supplied plaintext is not a multiple of the blocksize of the cipher, then the remaining plaintext will be cached. The next time the encrypt function is called with some plaintext, the new plaintext will be concatenated to the cache and then cache+plaintext will be encrypted. + +CFB, OFB, CTR: +-------------- When the chaining mode allows the cipher to act as a stream cipher, the encrypt function will always encrypt all of the supplied plaintext immediately. No cache will be kept. + +XTS: +---- Because the handling of the last two blocks is linked, it needs the whole block of plaintext to be supplied at once. Every encrypt function called on a XTS cipher will output an encrypted block based on the current supplied plaintext block. + +CMAC: +----- Everytime the function is called, the hash from the input data is calculated. No finalizing needed. The hashlength is equal to block size of the used block cipher. + +--- + + + +### method `final` + +```python +final(style='pkcs7') +``` + +Finalizes the encryption by padding the cache + + padfct = padding function import from CryptoPlus.Util.padding + +For ECB, CBC: the remaining bytes in the cache will be padded and encrypted. For OFB,CFB, CTR: an encrypted padding will be returned, making the total outputed bytes since construction of the cipher a multiple of the blocksize of that cipher. + +If the cipher has been used for decryption, the final function won't do anything. You have to manually unpad if necessary. + +After finalization, the chain can still be used but the IV, counter etc aren't reset but just continue as they were after the last step (finalization step). + +--- + + + +### classmethod `new` + +```python +new(key, mode=1, IV=None, counter=None, segment_size=None) +``` + + + + + + +--- + + + +## class `python_Twofish` + + + + + + +### method `__init__` + +```python +__init__(key, mode, IV, counter, segment_size) +``` + + + + + + + + +--- + + + +### method `decrypt` + +```python +decrypt(ciphertext, n='') +``` + +Decrypt some ciphertext + + ciphertext = a string of binary data n = the 'tweak' value when the chaining mode is XTS + +The decrypt function will decrypt the supplied ciphertext. The behavior varies slightly depending on the chaining mode. + +ECB, CBC: +--------- When the supplied ciphertext is not a multiple of the blocksize of the cipher, then the remaining ciphertext will be cached. The next time the decrypt function is called with some ciphertext, the new ciphertext will be concatenated to the cache and then cache+ciphertext will be decrypted. + +CFB, OFB, CTR: +-------------- When the chaining mode allows the cipher to act as a stream cipher, the decrypt function will always decrypt all of the supplied ciphertext immediately. No cache will be kept. + +XTS: +---- Because the handling of the last two blocks is linked, it needs the whole block of ciphertext to be supplied at once. Every decrypt function called on a XTS cipher will output a decrypted block based on the current supplied ciphertext block. + +CMAC: +----- Mode not supported for decryption as this does not make sense. + +--- + + + +### method `encrypt` + +```python +encrypt(plaintext, n='') +``` + +Encrypt some plaintext + + plaintext = a string of binary data n = the 'tweak' value when the chaining mode is XTS + +The encrypt function will encrypt the supplied plaintext. The behavior varies slightly depending on the chaining mode. + +ECB, CBC: +--------- When the supplied plaintext is not a multiple of the blocksize of the cipher, then the remaining plaintext will be cached. The next time the encrypt function is called with some plaintext, the new plaintext will be concatenated to the cache and then cache+plaintext will be encrypted. + +CFB, OFB, CTR: +-------------- When the chaining mode allows the cipher to act as a stream cipher, the encrypt function will always encrypt all of the supplied plaintext immediately. No cache will be kept. + +XTS: +---- Because the handling of the last two blocks is linked, it needs the whole block of plaintext to be supplied at once. Every encrypt function called on a XTS cipher will output an encrypted block based on the current supplied plaintext block. + +CMAC: +----- Everytime the function is called, the hash from the input data is calculated. No finalizing needed. The hashlength is equal to block size of the used block cipher. + +--- + + + +### method `final` + +```python +final(style='pkcs7') +``` + +Finalizes the encryption by padding the cache + + padfct = padding function import from CryptoPlus.Util.padding + +For ECB, CBC: the remaining bytes in the cache will be padded and encrypted. For OFB,CFB, CTR: an encrypted padding will be returned, making the total outputed bytes since construction of the cipher a multiple of the blocksize of that cipher. + +If the cipher has been used for decryption, the final function won't do anything. You have to manually unpad if necessary. + +After finalization, the chain can still be used but the IV, counter etc aren't reset but just continue as they were after the last step (finalization step). + +--- + + + +### classmethod `new` + +```python +new(key, mode=1, IV=None, counter=None, segment_size=None) +``` + + + + + + + + +--- + +_This file was automatically generated via [lazydocs](https://github.com/ml-tooling/lazydocs)._ diff --git a/pykeepass.md b/pykeepass.md new file mode 100644 index 00000000..c70ad44c --- /dev/null +++ b/pykeepass.md @@ -0,0 +1,809 @@ + + + + +# module `pykeepass` + + + + +**Global Variables** +--------------- +- **baseelement** +- **group**: # FIXME python2 + +- **entry**: # FIXME python2 + +- **exceptions**: # ----- binary parsing exceptions ----- + +- **attachment**: # FIXME python2 + +- **kdbx_parsing** +- **xpath**: # FIXME python2 + +- **pykeepass**: # coding: utf-8 + +- **version** +- **kdf_uuids** +- **attachment_xp** +- **entry_xp** +- **group_xp** +- **path_xp** +- **BLANK_DATABASE_FILENAME** +- **BLANK_DATABASE_LOCATION** +- **BLANK_DATABASE_PASSWORD** + +--- + + + +## function `create_database` + +```python +create_database(filename, password=None, keyfile=None, transformed_key=None) +``` + + + + + + +--- + + + +## function `debug_setup` + +```python +debug_setup() +``` + +Convenience function to quickly enable debug messages + + +--- + + + +## class `PyKeePass` +Open a KeePass database + + + +**Args:** + + - `filename` (:obj:`str`, optional): path to database or stream object. If None, the path given when the database was opened is used. + - `password` (:obj:`str`, optional): database password. If None, database is assumed to have no password + - `keyfile` (:obj:`str`, optional): path to keyfile. If None, database is assumed to have no keyfile + - `transformed_key` (:obj:`bytes`, optional): precomputed transformed key. + + + +**Raises:** + + - `CredentialsError`: raised when password/keyfile or transformed key are wrong + - `HeaderChecksumError`: raised when checksum in database header is is wrong. e.g. database tampering or file corruption + - `PayloadChecksumError`: raised when payload blocks checksum is wrong, e.g. corruption during database saving + + + +**Todo:** + + - raise, no filename provided, database not open + + + +### method `__init__` + +```python +__init__(filename, password=None, keyfile=None, transformed_key=None) +``` + + + + + + +--- + +#### property attachments + + + + + +--- + +#### property binaries + + + + + +--- + +#### property credchange_date + + + + + +--- + +#### property credchange_recommended + + + + + +--- + +#### property credchange_recommended_days + +Days until password update should be recommended + +--- + +#### property credchange_required + + + + + +--- + +#### property credchange_required_days + +Days until password update should be required + +--- + +#### property encryption_algorithm + +str: encryption algorithm used by database during decryption. Can be one of 'aes256', 'chacha20', or 'twofish'. + +--- + +#### property entries + +:obj:`list` of :obj:`Entry`: list of all Entry objects in database, excluding history + +--- + +#### property groups + +:obj:`list` of :obj:`Group`: list of all Group objects in database + + + +--- + +#### property kdf_algorithm + +str: key derivation algorithm used by database during decryption. Can be one of 'aeskdf', 'argon2', or 'aeskdf' + +--- + +#### property keyfile + + + + + +--- + +#### property password + + + + + +--- + +#### property recyclebin_group + +Group: RecycleBin Group of database + +--- + +#### property root_group + +Group: root Group of database + +--- + +#### property transformed_key + +bytes: transformed key used in database decryption. May be cached and passed to `open` for faster database opening + +--- + +#### property tree + +lxml.etree._ElementTree: database XML payload + +--- + +#### property version + +tuple: Length 2 tuple of ints containing major and minor versions. Generally (3, 1) or (4, 0). + + + +--- + + + +### method `add_binary` + +```python +add_binary(data, compressed=True, protected=True) +``` + + + + + +--- + + + +### method `add_entry` + +```python +add_entry( + destination_group, + title, + username, + password, + url=None, + notes=None, + expiry_time=None, + tags=None, + otp=None, + icon=None, + force_creation=False +) +``` + + + + + +--- + + + +### method `add_group` + +```python +add_group(destination_group, group_name, icon=None, notes=None) +``` + + + + + +--- + + + +### method `delete_binary` + +```python +delete_binary(id) +``` + + + + + +--- + + + +### method `delete_entry` + +```python +delete_entry(entry) +``` + + + + + +--- + + + +### method `delete_group` + +```python +delete_group(group) +``` + + + + + +--- + + + +### method `deref` + +```python +deref(value) +``` + + + + + +--- + + + +### method `dump_xml` + +```python +dump_xml(filename) +``` + +Dump the contents of the database to file as XML + + + +**Args:** + + - `filename` (str): path to output file + +--- + + + +### method `empty_group` + +```python +empty_group(group) +``` + +Delete the content of a group. + +This does not delete the group itself + + + +**Args:** + + - `group` (:obj:`Group`): Group to empty + +--- + + + +### method `find_attachments` + +```python +find_attachments(recursive=True, path=None, element=None, **kwargs) +``` + + + + + +--- + + + +### method `find_entries` + +```python +find_entries(recursive=True, path=None, group=None, **kwargs) +``` + + + + + +--- + + + +### method `find_entries_by_notes` + +```python +find_entries_by_notes( + notes, + regex=False, + flags=None, + group=None, + history=False, + first=False +) +``` + + + + + +--- + + + +### method `find_entries_by_password` + +```python +find_entries_by_password( + password, + regex=False, + flags=None, + group=None, + history=False, + first=False +) +``` + + + + + +--- + + + +### method `find_entries_by_path` + +```python +find_entries_by_path( + path, + regex=False, + flags=None, + group=None, + history=False, + first=False +) +``` + + + + + +--- + + + +### method `find_entries_by_string` + +```python +find_entries_by_string( + string, + regex=False, + flags=None, + group=None, + history=False, + first=False +) +``` + + + + + +--- + + + +### method `find_entries_by_title` + +```python +find_entries_by_title( + title, + regex=False, + flags=None, + group=None, + history=False, + first=False +) +``` + + + + + +--- + + + +### method `find_entries_by_url` + +```python +find_entries_by_url( + url, + regex=False, + flags=None, + group=None, + history=False, + first=False +) +``` + + + + + +--- + + + +### method `find_entries_by_username` + +```python +find_entries_by_username( + username, + regex=False, + flags=None, + group=None, + history=False, + first=False +) +``` + + + + + +--- + + + +### method `find_entries_by_uuid` + +```python +find_entries_by_uuid( + uuid, + regex=False, + flags=None, + group=None, + history=False, + first=False +) +``` + + + + + +--- + + + +### method `find_groups` + +```python +find_groups(recursive=True, path=None, group=None, **kwargs) +``` + + + + + +--- + + + +### method `find_groups_by_name` + +```python +find_groups_by_name( + group_name, + regex=False, + flags=None, + group=None, + first=False +) +``` + + + + + +--- + + + +### method `find_groups_by_notes` + +```python +find_groups_by_notes( + notes, + regex=False, + flags=None, + group=None, + history=False, + first=False +) +``` + + + + + +--- + + + +### method `find_groups_by_path` + +```python +find_groups_by_path( + group_path_str=None, + regex=False, + flags=None, + group=None, + first=False +) +``` + + + + + +--- + + + +### method `find_groups_by_uuid` + +```python +find_groups_by_uuid( + uuid, + regex=False, + flags=None, + group=None, + history=False, + first=False +) +``` + + + + + +--- + + + +### method `move_entry` + +```python +move_entry(entry, destination_group) +``` + + + + + +--- + + + +### method `move_group` + +```python +move_group(group, destination_group) +``` + + + + + +--- + + + +### method `read` + +```python +read(filename=None, password=None, keyfile=None, transformed_key=None) +``` + +See class docstring. + + + +**Todo:** + + - raise, no filename provided, database not open + +--- + + + +### method `reload` + +```python +reload() +``` + +Reload current database using previous credentials + +--- + + + +### method `save` + +```python +save(filename=None, transformed_key=None) +``` + +Save current database object to disk. + + + +**Args:** + + - `filename` (:obj:`str`, optional): path to database or stream object. If None, the path given when the database was opened is used. PyKeePass.filename is unchanged. + - `transformed_key` (:obj:`bytes`, optional): precomputed transformed key. + +--- + + + +### method `trash_entry` + +```python +trash_entry(entry) +``` + +Move an entry to the RecycleBin + + + +**Args:** + + - `entry` (:obj:`Entry`): Entry to send to the RecycleBin + +--- + + + +### method `trash_group` + +```python +trash_group(group) +``` + +Move a group to the RecycleBin + + + +**Args:** + + - `group` (:obj:`Group`): Group to send to the RecycleBin + +--- + + + +### method `xml` + +```python +xml() +``` + +Get XML part of database as string + + + +**Returns:** + + - `str`: XML payload section of database. + + + + +--- + +_This file was automatically generated via [lazydocs](https://github.com/ml-tooling/lazydocs)._ diff --git a/setters.md b/setters.md new file mode 100644 index 00000000..6989f45f --- /dev/null +++ b/setters.md @@ -0,0 +1,75 @@ + + + + +# module `setters` + + + + + +--- + + + +## function `get_time` + +```python +get_time(e, prop) +``` + + + + + + +--- + + + +## function `set_time` + +```python +set_time(e, prop, value) +``` + + + + + + +--- + + + +## function `get_text` + +```python +get_text(tag) +``` + + + + + + +--- + + + +## function `set_text` + +```python +set_text(tag, value) +``` + + + + + + + + +--- + +_This file was automatically generated via [lazydocs](https://github.com/ml-tooling/lazydocs)._ diff --git a/version.md b/version.md new file mode 100644 index 00000000..c6025232 --- /dev/null +++ b/version.md @@ -0,0 +1,16 @@ + + + + +# module `version` + + + + + + + + +--- + +_This file was automatically generated via [lazydocs](https://github.com/ml-tooling/lazydocs)._ diff --git a/xpath.md b/xpath.md new file mode 100644 index 00000000..784559d0 --- /dev/null +++ b/xpath.md @@ -0,0 +1,22 @@ + + + + +# module `xpath` + + + + +**Global Variables** +--------------- +- **attachment_xp** +- **path_xp** +- **entry_xp** +- **group_xp** + + + + +--- + +_This file was automatically generated via [lazydocs](https://github.com/ml-tooling/lazydocs)._