├── tests
├── data
│ ├── CP-1252.kdb.key
│ ├── NonAscii.kdbx.key
│ ├── FileKeyBinary.key
│ ├── FileKeyHex.key
│ ├── CP-1252.kdb
│ ├── Twofish.kdb
│ ├── basic.kdb
│ ├── bug392.kdbx
│ ├── NonAscii.kdbx
│ ├── CompositeKey.kdb
│ ├── Compressed.kdbx
│ ├── FileKeyHex.kdb
│ ├── FileKeyHex.kdbx
│ ├── FileKeyXml.kdbx
│ ├── Format200.kdbx
│ ├── Format300.kdbx
│ ├── NewDatabase.kdbx
│ ├── FileKeyBinary.kdb
│ ├── FileKeyBinary.kdbx
│ ├── FileKeyHashed.kdb
│ ├── FileKeyHashed.kdbx
│ ├── FileKeyHashed.key
│ ├── BrokenHeaderHash.kdbx
│ ├── ProtectedStrings.kdbx
│ ├── FileKeyXmlBrokenBase64.kdbx
│ ├── BrokenNoRootGroup.xml
│ ├── BrokenNoGroupUuid.xml
│ ├── FileKeyXmlBrokenBase64.key
│ ├── FileKeyXml.key
│ ├── BrokenTwoRootGroups.xml
│ ├── BrokenTwoRoots.xml
│ ├── BrokenNoEntryUuid.xml
│ ├── BrokenGroupReference.xml
│ ├── BrokenDeletedObjects.xml
│ └── EmptyUuids.xml
├── config-keepassx-tests.h.cmake
├── gui
│ ├── CMakeLists.txt
│ └── TestGuiPixmaps.h
├── TestCryptoHash.h
├── TestGroupModel.h
├── TestKeePass2RandomStream.h
├── TestExporter.h
├── TestEntry.h
├── TestModified.h
├── TestHashedBlockStream.h
├── TestKeys.h
├── TestGroup.h
├── TestSymmetricCipher.h
├── TestKeePass2Reader.h
├── TestDeletedObjects.h
├── TestEntryModel.h
├── FailDevice.h
├── TestKeePass2Writer.h
├── TestEntrySearcher.h
├── TestCsvExporter.h
├── TestRandom.h
├── TestWildcardMatcher.h
├── TestYkChallengeResponseKey.h
├── TestKeePass1Reader.h
├── TestKeePass2XmlReader.h
├── TestCryptoHash.cpp
└── TestAutoType.h
├── .gitignore
├── .gitattributes
├── src
├── streams
│ ├── QtIOCompressor
│ ├── StoreDataStream.h
│ ├── LayeredStream.h
│ ├── StoreDataStream.cpp
│ └── HashedBlockStream.h
├── version.h.cmake
├── autotype
│ ├── test
│ │ ├── CMakeLists.txt
│ │ └── AutoTypeTestInterface.h
│ ├── xcb
│ │ └── CMakeLists.txt
│ ├── CMakeLists.txt
│ ├── AutoTypeSelectView.h
│ ├── WindowSelectComboBox.h
│ ├── ShortcutWidget.h
│ ├── WildcardMatcher.h
│ ├── AutoTypeSelectDialog.h
│ ├── AutoTypeSelectView.cpp
│ └── AutoTypePlatformPlugin.h
├── core
│ ├── Exporter.h
│ ├── ToDbExporter.h
│ ├── ListDeleter.h
│ ├── Translator.h
│ ├── Global.h
│ ├── EntrySearcher.h
│ ├── ToDbExporter.cpp
│ ├── InactivityTimer.h
│ ├── TimeDelta.h
│ ├── DatabaseIcons.h
│ ├── FilePath.h
│ ├── Uuid.h
│ ├── Config.h
│ ├── TimeDelta.cpp
│ └── TimeInfo.h
├── gui
│ ├── WelcomeWidget.ui
│ ├── WelcomeWidget.cpp
│ ├── UnlockDatabaseWidget.h
│ ├── KeePass1OpenWidget.h
│ ├── WelcomeWidget.h
│ ├── AboutDialog.h
│ ├── DialogyWidget.h
│ ├── Application.h
│ ├── DatabaseRepairWidget.h
│ ├── LineEdit.h
│ ├── EditWidgetProperties.h
│ ├── SortFilterHideProxyModel.h
│ ├── UnlockDatabaseWidget.cpp
│ ├── Clipboard.h
│ ├── DragTabBar.h
│ ├── PasswordComboBox.h
│ ├── PasswordEdit.h
│ ├── SortFilterHideProxyModel.cpp
│ ├── EditWidgetProperties.cpp
│ ├── DatabaseSettingsWidget.h
│ ├── EditWidget.h
│ ├── SettingsWidget.h
│ ├── ChangeMasterKeyWidget.h
│ ├── DatabaseWidgetStateSync.h
│ └── entry
│ │ ├── EntryHistoryModel.h
│ │ └── EntryAttachmentsModel.h
├── config-keepassx.h.cmake
├── keys
│ ├── Key.h
│ ├── CompositeKey_p.h
│ ├── ChallengeResponseKey.h
│ ├── PasswordKey.h
│ ├── PasswordKey.cpp
│ ├── YkChallengeResponseKey.h
│ ├── FileKey.h
│ └── drivers
│ │ └── YubiKeyStub.cpp
├── format
│ ├── KeePass1.h
│ ├── CsvExporter.h
│ ├── KeePass2RandomStream.h
│ ├── KeePass2Repair.h
│ └── KeePass2Writer.h
└── crypto
│ ├── CryptoHash.h
│ ├── Crypto.h
│ ├── SymmetricCipherBackend.h
│ └── Random.h
├── share
├── windows
│ ├── icon.rc
│ └── keepassx.ico
├── macosx
│ ├── keepassx.icns
│ └── Info.plist.cmake
├── icons
│ ├── database
│ │ ├── C33_Run.png
│ │ ├── C36_Ark.png
│ │ ├── C62_Tux.png
│ │ ├── C65_W.png
│ │ ├── C06_KCMDF.png
│ │ ├── C07_Kate.png
│ │ ├── C20_Misc.png
│ │ ├── C22_ASCII.png
│ │ ├── C23_Icons.png
│ │ ├── C35_KRFB.png
│ │ ├── C46_Help.png
│ │ ├── C53_Apply.png
│ │ ├── C58_KGPG.png
│ │ ├── C64_Apple.png
│ │ ├── C66_Money.png
│ │ ├── C00_Password.png
│ │ ├── C03_Server.png
│ │ ├── C04_Klipper.png
│ │ ├── C08_Socket.png
│ │ ├── C09_Identity.png
│ │ ├── C10_Kontact.png
│ │ ├── C11_Camera.png
│ │ ├── C15_Scanner.png
│ │ ├── C18_Display.png
│ │ ├── C26_FileSave.png
│ │ ├── C30_Konsole.png
│ │ ├── C32_FSView.png
│ │ ├── C39_History.png
│ │ ├── C44_KNotes.png
│ │ ├── C45_Cancel.png
│ │ ├── C47_KPackage.png
│ │ ├── C48_Folder.png
│ │ ├── C60_KFM_Home.png
│ │ ├── C61_Services.png
│ │ ├── C63_Feather.png
│ │ ├── C13_KGPG_Key3.png
│ │ ├── C21_KOrganizer.png
│ │ ├── C28_QuickTime.png
│ │ ├── C29_KGPG_Term.png
│ │ ├── C31_FilePrint.png
│ │ ├── C34_Configure.png
│ │ ├── C40_Mail_Find.png
│ │ ├── C41_VectorGfx.png
│ │ ├── C42_KCMMemory.png
│ │ ├── C43_EditTrash.png
│ │ ├── C50_Folder_Tar.png
│ │ ├── C51_Decrypted.png
│ │ ├── C52_Encrypted.png
│ │ ├── C54_Signature.png
│ │ ├── C55_Thumbnail.png
│ │ ├── C57_View_Text.png
│ │ ├── C68_BlackBerry.png
│ │ ├── C05_Edu_Languages.png
│ │ ├── C12_IRKickFlash.png
│ │ ├── C14_Laptop_Power.png
│ │ ├── C17_CDROM_Unmount.png
│ │ ├── C19_Mail_Generic.png
│ │ ├── C25_Folder_Mail.png
│ │ ├── C27_NFS_Unmount.png
│ │ ├── C37_KPercentage.png
│ │ ├── C38_Samba_Unmount.png
│ │ ├── C56_KAddressBook.png
│ │ ├── C67_Certificate.png
│ │ ├── C01_Package_Network.png
│ │ ├── C02_MessageBox_Warning.png
│ │ ├── C16_Mozilla_Firebird.png
│ │ ├── C49_Folder_Blue_Open.png
│ │ ├── C24_Connect_Established.png
│ │ └── C59_Package_Development.png
│ ├── svg
│ │ ├── configure.svgz
│ │ ├── dialog-ok.svgz
│ │ ├── dialog-close.svgz
│ │ ├── dialog-error.svgz
│ │ ├── document-edit.svgz
│ │ ├── document-new.svgz
│ │ ├── document-open.svgz
│ │ ├── document-save.svgz
│ │ ├── password-copy.svgz
│ │ ├── system-search.svgz
│ │ ├── username-copy.svgz
│ │ ├── application-exit.svgz
│ │ ├── dialog-warning.svgz
│ │ ├── document-close.svgz
│ │ ├── document-save-as.svgz
│ │ ├── dialog-information.svgz
│ │ ├── application-x-keepassx.svgz
│ │ ├── application-x-keepassx-16.svgz
│ │ ├── edit-clear-locationbar-ltr.svgz
│ │ └── edit-clear-locationbar-rtl.svgz
│ └── application
│ │ ├── 16x16
│ │ ├── apps
│ │ │ └── keepassx.png
│ │ ├── actions
│ │ │ ├── auto-type.png
│ │ │ ├── configure.png
│ │ │ ├── entry-edit.png
│ │ │ ├── entry-new.png
│ │ │ ├── group-edit.png
│ │ │ ├── group-new.png
│ │ │ ├── help-about.png
│ │ │ ├── document-new.png
│ │ │ ├── entry-clone.png
│ │ │ ├── entry-delete.png
│ │ │ ├── group-delete.png
│ │ │ ├── document-close.png
│ │ │ ├── document-edit.png
│ │ │ ├── document-open.png
│ │ │ ├── document-save.png
│ │ │ ├── password-copy.png
│ │ │ ├── system-search.png
│ │ │ ├── username-copy.png
│ │ │ ├── application-exit.png
│ │ │ ├── document-encrypt.png
│ │ │ ├── document-save-as.png
│ │ │ ├── password-generate.png
│ │ │ ├── password-show-off.png
│ │ │ ├── password-show-on.png
│ │ │ ├── database-change-key.png
│ │ │ ├── edit-clear-locationbar-ltr.png
│ │ │ └── edit-clear-locationbar-rtl.png
│ │ └── mimetypes
│ │ │ └── application-x-keepassx.png
│ │ ├── 24x24
│ │ └── apps
│ │ │ └── keepassx.png
│ │ ├── 32x32
│ │ ├── apps
│ │ │ └── keepassx.png
│ │ └── mimetypes
│ │ │ └── application-x-keepassx.png
│ │ ├── 48x48
│ │ └── apps
│ │ │ └── keepassx.png
│ │ ├── 64x64
│ │ ├── apps
│ │ │ └── keepassx.png
│ │ └── mimetypes
│ │ │ └── application-x-keepassx.png
│ │ ├── 128x128
│ │ ├── apps
│ │ │ └── keepassx.png
│ │ └── mimetypes
│ │ │ └── application-x-keepassx.png
│ │ ├── 256x256
│ │ └── apps
│ │ │ └── keepassx.png
│ │ ├── 22x22
│ │ ├── actions
│ │ │ ├── dialog-ok.png
│ │ │ ├── entry-edit.png
│ │ │ ├── entry-new.png
│ │ │ ├── dialog-close.png
│ │ │ ├── entry-delete.png
│ │ │ ├── document-open.png
│ │ │ ├── document-save.png
│ │ │ ├── password-copy.png
│ │ │ ├── system-search.png
│ │ │ ├── username-copy.png
│ │ │ └── document-encrypt.png
│ │ ├── status
│ │ │ ├── dialog-error.png
│ │ │ ├── dialog-warning.png
│ │ │ └── dialog-information.png
│ │ └── mimetypes
│ │ │ └── application-x-keepassx.png
│ │ └── scalable
│ │ └── apps
│ │ └── keepassx.svgz
├── linux
│ ├── keepassx.xml
│ └── keepassx.desktop
└── translations
│ ├── update.sh
│ ├── CMakeLists.txt
│ └── keepassx_en_plurals.ts
├── .tx
└── config
├── INSTALL
├── utils
└── CMakeLists.txt
├── LICENSE.NOKIA-LGPL-EXCEPTION
├── .travis.yml
├── LICENSE.BSD
├── LICENSE.BOOST-1.0
└── cmake
├── GetGitRevisionDescription.cmake.in
├── FindYubiKey.cmake
└── FindGcrypt.cmake
/tests/data/CP-1252.kdb.key:
--------------------------------------------------------------------------------
1 | „password”
--------------------------------------------------------------------------------
/tests/data/NonAscii.kdbx.key:
--------------------------------------------------------------------------------
1 | Δöض
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | CMakeLists.txt.*
2 | build/
3 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | src/version.h.cmake export-subst
2 |
--------------------------------------------------------------------------------
/src/streams/QtIOCompressor:
--------------------------------------------------------------------------------
1 | #include "qtiocompressor.h"
2 |
--------------------------------------------------------------------------------
/tests/data/FileKeyBinary.key:
--------------------------------------------------------------------------------
1 | !"#$%&'()012
--------------------------------------------------------------------------------
/share/windows/icon.rc:
--------------------------------------------------------------------------------
1 | IDI_ICON1 ICON DISCARDABLE "keepassx.ico"
2 |
--------------------------------------------------------------------------------
/tests/data/FileKeyHex.key:
--------------------------------------------------------------------------------
1 | 0123456789abcdeffedcba98765432100123456789abcdeffedcba9876543210
--------------------------------------------------------------------------------
/tests/data/CP-1252.kdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/tests/data/CP-1252.kdb
--------------------------------------------------------------------------------
/tests/data/Twofish.kdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/tests/data/Twofish.kdb
--------------------------------------------------------------------------------
/tests/data/basic.kdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/tests/data/basic.kdb
--------------------------------------------------------------------------------
/tests/data/bug392.kdbx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/tests/data/bug392.kdbx
--------------------------------------------------------------------------------
/tests/data/NonAscii.kdbx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/tests/data/NonAscii.kdbx
--------------------------------------------------------------------------------
/share/macosx/keepassx.icns:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/macosx/keepassx.icns
--------------------------------------------------------------------------------
/share/windows/keepassx.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/windows/keepassx.ico
--------------------------------------------------------------------------------
/tests/data/CompositeKey.kdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/tests/data/CompositeKey.kdb
--------------------------------------------------------------------------------
/tests/data/Compressed.kdbx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/tests/data/Compressed.kdbx
--------------------------------------------------------------------------------
/tests/data/FileKeyHex.kdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/tests/data/FileKeyHex.kdb
--------------------------------------------------------------------------------
/tests/data/FileKeyHex.kdbx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/tests/data/FileKeyHex.kdbx
--------------------------------------------------------------------------------
/tests/data/FileKeyXml.kdbx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/tests/data/FileKeyXml.kdbx
--------------------------------------------------------------------------------
/tests/data/Format200.kdbx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/tests/data/Format200.kdbx
--------------------------------------------------------------------------------
/tests/data/Format300.kdbx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/tests/data/Format300.kdbx
--------------------------------------------------------------------------------
/tests/data/NewDatabase.kdbx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/tests/data/NewDatabase.kdbx
--------------------------------------------------------------------------------
/tests/data/FileKeyBinary.kdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/tests/data/FileKeyBinary.kdb
--------------------------------------------------------------------------------
/tests/data/FileKeyBinary.kdbx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/tests/data/FileKeyBinary.kdbx
--------------------------------------------------------------------------------
/tests/data/FileKeyHashed.kdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/tests/data/FileKeyHashed.kdb
--------------------------------------------------------------------------------
/tests/data/FileKeyHashed.kdbx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/tests/data/FileKeyHashed.kdbx
--------------------------------------------------------------------------------
/tests/data/FileKeyHashed.key:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/tests/data/FileKeyHashed.key
--------------------------------------------------------------------------------
/share/icons/database/C33_Run.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C33_Run.png
--------------------------------------------------------------------------------
/share/icons/database/C36_Ark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C36_Ark.png
--------------------------------------------------------------------------------
/share/icons/database/C62_Tux.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C62_Tux.png
--------------------------------------------------------------------------------
/share/icons/database/C65_W.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C65_W.png
--------------------------------------------------------------------------------
/share/icons/svg/configure.svgz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/svg/configure.svgz
--------------------------------------------------------------------------------
/share/icons/svg/dialog-ok.svgz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/svg/dialog-ok.svgz
--------------------------------------------------------------------------------
/tests/data/BrokenHeaderHash.kdbx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/tests/data/BrokenHeaderHash.kdbx
--------------------------------------------------------------------------------
/tests/data/ProtectedStrings.kdbx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/tests/data/ProtectedStrings.kdbx
--------------------------------------------------------------------------------
/share/icons/database/C06_KCMDF.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C06_KCMDF.png
--------------------------------------------------------------------------------
/share/icons/database/C07_Kate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C07_Kate.png
--------------------------------------------------------------------------------
/share/icons/database/C20_Misc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C20_Misc.png
--------------------------------------------------------------------------------
/share/icons/database/C22_ASCII.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C22_ASCII.png
--------------------------------------------------------------------------------
/share/icons/database/C23_Icons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C23_Icons.png
--------------------------------------------------------------------------------
/share/icons/database/C35_KRFB.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C35_KRFB.png
--------------------------------------------------------------------------------
/share/icons/database/C46_Help.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C46_Help.png
--------------------------------------------------------------------------------
/share/icons/database/C53_Apply.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C53_Apply.png
--------------------------------------------------------------------------------
/share/icons/database/C58_KGPG.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C58_KGPG.png
--------------------------------------------------------------------------------
/share/icons/database/C64_Apple.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C64_Apple.png
--------------------------------------------------------------------------------
/share/icons/database/C66_Money.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C66_Money.png
--------------------------------------------------------------------------------
/share/icons/svg/dialog-close.svgz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/svg/dialog-close.svgz
--------------------------------------------------------------------------------
/share/icons/svg/dialog-error.svgz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/svg/dialog-error.svgz
--------------------------------------------------------------------------------
/share/icons/svg/document-edit.svgz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/svg/document-edit.svgz
--------------------------------------------------------------------------------
/share/icons/svg/document-new.svgz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/svg/document-new.svgz
--------------------------------------------------------------------------------
/share/icons/svg/document-open.svgz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/svg/document-open.svgz
--------------------------------------------------------------------------------
/share/icons/svg/document-save.svgz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/svg/document-save.svgz
--------------------------------------------------------------------------------
/share/icons/svg/password-copy.svgz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/svg/password-copy.svgz
--------------------------------------------------------------------------------
/share/icons/svg/system-search.svgz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/svg/system-search.svgz
--------------------------------------------------------------------------------
/share/icons/svg/username-copy.svgz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/svg/username-copy.svgz
--------------------------------------------------------------------------------
/share/icons/database/C00_Password.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C00_Password.png
--------------------------------------------------------------------------------
/share/icons/database/C03_Server.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C03_Server.png
--------------------------------------------------------------------------------
/share/icons/database/C04_Klipper.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C04_Klipper.png
--------------------------------------------------------------------------------
/share/icons/database/C08_Socket.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C08_Socket.png
--------------------------------------------------------------------------------
/share/icons/database/C09_Identity.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C09_Identity.png
--------------------------------------------------------------------------------
/share/icons/database/C10_Kontact.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C10_Kontact.png
--------------------------------------------------------------------------------
/share/icons/database/C11_Camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C11_Camera.png
--------------------------------------------------------------------------------
/share/icons/database/C15_Scanner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C15_Scanner.png
--------------------------------------------------------------------------------
/share/icons/database/C18_Display.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C18_Display.png
--------------------------------------------------------------------------------
/share/icons/database/C26_FileSave.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C26_FileSave.png
--------------------------------------------------------------------------------
/share/icons/database/C30_Konsole.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C30_Konsole.png
--------------------------------------------------------------------------------
/share/icons/database/C32_FSView.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C32_FSView.png
--------------------------------------------------------------------------------
/share/icons/database/C39_History.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C39_History.png
--------------------------------------------------------------------------------
/share/icons/database/C44_KNotes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C44_KNotes.png
--------------------------------------------------------------------------------
/share/icons/database/C45_Cancel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C45_Cancel.png
--------------------------------------------------------------------------------
/share/icons/database/C47_KPackage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C47_KPackage.png
--------------------------------------------------------------------------------
/share/icons/database/C48_Folder.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C48_Folder.png
--------------------------------------------------------------------------------
/share/icons/database/C60_KFM_Home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C60_KFM_Home.png
--------------------------------------------------------------------------------
/share/icons/database/C61_Services.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C61_Services.png
--------------------------------------------------------------------------------
/share/icons/database/C63_Feather.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C63_Feather.png
--------------------------------------------------------------------------------
/share/icons/svg/application-exit.svgz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/svg/application-exit.svgz
--------------------------------------------------------------------------------
/share/icons/svg/dialog-warning.svgz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/svg/dialog-warning.svgz
--------------------------------------------------------------------------------
/share/icons/svg/document-close.svgz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/svg/document-close.svgz
--------------------------------------------------------------------------------
/share/icons/svg/document-save-as.svgz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/svg/document-save-as.svgz
--------------------------------------------------------------------------------
/share/icons/database/C13_KGPG_Key3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C13_KGPG_Key3.png
--------------------------------------------------------------------------------
/share/icons/database/C21_KOrganizer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C21_KOrganizer.png
--------------------------------------------------------------------------------
/share/icons/database/C28_QuickTime.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C28_QuickTime.png
--------------------------------------------------------------------------------
/share/icons/database/C29_KGPG_Term.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C29_KGPG_Term.png
--------------------------------------------------------------------------------
/share/icons/database/C31_FilePrint.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C31_FilePrint.png
--------------------------------------------------------------------------------
/share/icons/database/C34_Configure.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C34_Configure.png
--------------------------------------------------------------------------------
/share/icons/database/C40_Mail_Find.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C40_Mail_Find.png
--------------------------------------------------------------------------------
/share/icons/database/C41_VectorGfx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C41_VectorGfx.png
--------------------------------------------------------------------------------
/share/icons/database/C42_KCMMemory.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C42_KCMMemory.png
--------------------------------------------------------------------------------
/share/icons/database/C43_EditTrash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C43_EditTrash.png
--------------------------------------------------------------------------------
/share/icons/database/C50_Folder_Tar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C50_Folder_Tar.png
--------------------------------------------------------------------------------
/share/icons/database/C51_Decrypted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C51_Decrypted.png
--------------------------------------------------------------------------------
/share/icons/database/C52_Encrypted.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C52_Encrypted.png
--------------------------------------------------------------------------------
/share/icons/database/C54_Signature.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C54_Signature.png
--------------------------------------------------------------------------------
/share/icons/database/C55_Thumbnail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C55_Thumbnail.png
--------------------------------------------------------------------------------
/share/icons/database/C57_View_Text.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C57_View_Text.png
--------------------------------------------------------------------------------
/share/icons/database/C68_BlackBerry.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C68_BlackBerry.png
--------------------------------------------------------------------------------
/share/icons/svg/dialog-information.svgz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/svg/dialog-information.svgz
--------------------------------------------------------------------------------
/tests/data/FileKeyXmlBrokenBase64.kdbx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/tests/data/FileKeyXmlBrokenBase64.kdbx
--------------------------------------------------------------------------------
/share/icons/database/C05_Edu_Languages.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C05_Edu_Languages.png
--------------------------------------------------------------------------------
/share/icons/database/C12_IRKickFlash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C12_IRKickFlash.png
--------------------------------------------------------------------------------
/share/icons/database/C14_Laptop_Power.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C14_Laptop_Power.png
--------------------------------------------------------------------------------
/share/icons/database/C17_CDROM_Unmount.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C17_CDROM_Unmount.png
--------------------------------------------------------------------------------
/share/icons/database/C19_Mail_Generic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C19_Mail_Generic.png
--------------------------------------------------------------------------------
/share/icons/database/C25_Folder_Mail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C25_Folder_Mail.png
--------------------------------------------------------------------------------
/share/icons/database/C27_NFS_Unmount.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C27_NFS_Unmount.png
--------------------------------------------------------------------------------
/share/icons/database/C37_KPercentage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C37_KPercentage.png
--------------------------------------------------------------------------------
/share/icons/database/C38_Samba_Unmount.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C38_Samba_Unmount.png
--------------------------------------------------------------------------------
/share/icons/database/C56_KAddressBook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C56_KAddressBook.png
--------------------------------------------------------------------------------
/share/icons/database/C67_Certificate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C67_Certificate.png
--------------------------------------------------------------------------------
/share/icons/database/C01_Package_Network.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C01_Package_Network.png
--------------------------------------------------------------------------------
/share/icons/svg/application-x-keepassx.svgz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/svg/application-x-keepassx.svgz
--------------------------------------------------------------------------------
/share/icons/application/16x16/apps/keepassx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/apps/keepassx.png
--------------------------------------------------------------------------------
/share/icons/application/24x24/apps/keepassx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/24x24/apps/keepassx.png
--------------------------------------------------------------------------------
/share/icons/application/32x32/apps/keepassx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/32x32/apps/keepassx.png
--------------------------------------------------------------------------------
/share/icons/application/48x48/apps/keepassx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/48x48/apps/keepassx.png
--------------------------------------------------------------------------------
/share/icons/application/64x64/apps/keepassx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/64x64/apps/keepassx.png
--------------------------------------------------------------------------------
/share/icons/database/C02_MessageBox_Warning.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C02_MessageBox_Warning.png
--------------------------------------------------------------------------------
/share/icons/database/C16_Mozilla_Firebird.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C16_Mozilla_Firebird.png
--------------------------------------------------------------------------------
/share/icons/database/C49_Folder_Blue_Open.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C49_Folder_Blue_Open.png
--------------------------------------------------------------------------------
/share/icons/svg/application-x-keepassx-16.svgz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/svg/application-x-keepassx-16.svgz
--------------------------------------------------------------------------------
/share/icons/svg/edit-clear-locationbar-ltr.svgz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/svg/edit-clear-locationbar-ltr.svgz
--------------------------------------------------------------------------------
/share/icons/svg/edit-clear-locationbar-rtl.svgz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/svg/edit-clear-locationbar-rtl.svgz
--------------------------------------------------------------------------------
/share/icons/application/128x128/apps/keepassx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/128x128/apps/keepassx.png
--------------------------------------------------------------------------------
/share/icons/application/256x256/apps/keepassx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/256x256/apps/keepassx.png
--------------------------------------------------------------------------------
/share/icons/database/C24_Connect_Established.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C24_Connect_Established.png
--------------------------------------------------------------------------------
/share/icons/database/C59_Package_Development.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/database/C59_Package_Development.png
--------------------------------------------------------------------------------
/share/icons/application/16x16/actions/auto-type.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/actions/auto-type.png
--------------------------------------------------------------------------------
/share/icons/application/16x16/actions/configure.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/actions/configure.png
--------------------------------------------------------------------------------
/share/icons/application/16x16/actions/entry-edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/actions/entry-edit.png
--------------------------------------------------------------------------------
/share/icons/application/16x16/actions/entry-new.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/actions/entry-new.png
--------------------------------------------------------------------------------
/share/icons/application/16x16/actions/group-edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/actions/group-edit.png
--------------------------------------------------------------------------------
/share/icons/application/16x16/actions/group-new.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/actions/group-new.png
--------------------------------------------------------------------------------
/share/icons/application/16x16/actions/help-about.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/actions/help-about.png
--------------------------------------------------------------------------------
/share/icons/application/22x22/actions/dialog-ok.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/22x22/actions/dialog-ok.png
--------------------------------------------------------------------------------
/share/icons/application/22x22/actions/entry-edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/22x22/actions/entry-edit.png
--------------------------------------------------------------------------------
/share/icons/application/22x22/actions/entry-new.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/22x22/actions/entry-new.png
--------------------------------------------------------------------------------
/share/icons/application/scalable/apps/keepassx.svgz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/scalable/apps/keepassx.svgz
--------------------------------------------------------------------------------
/tests/data/BrokenNoRootGroup.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/share/icons/application/16x16/actions/document-new.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/actions/document-new.png
--------------------------------------------------------------------------------
/share/icons/application/16x16/actions/entry-clone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/actions/entry-clone.png
--------------------------------------------------------------------------------
/share/icons/application/16x16/actions/entry-delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/actions/entry-delete.png
--------------------------------------------------------------------------------
/share/icons/application/16x16/actions/group-delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/actions/group-delete.png
--------------------------------------------------------------------------------
/share/icons/application/22x22/actions/dialog-close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/22x22/actions/dialog-close.png
--------------------------------------------------------------------------------
/share/icons/application/22x22/actions/entry-delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/22x22/actions/entry-delete.png
--------------------------------------------------------------------------------
/share/icons/application/22x22/status/dialog-error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/22x22/status/dialog-error.png
--------------------------------------------------------------------------------
/share/icons/application/16x16/actions/document-close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/actions/document-close.png
--------------------------------------------------------------------------------
/share/icons/application/16x16/actions/document-edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/actions/document-edit.png
--------------------------------------------------------------------------------
/share/icons/application/16x16/actions/document-open.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/actions/document-open.png
--------------------------------------------------------------------------------
/share/icons/application/16x16/actions/document-save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/actions/document-save.png
--------------------------------------------------------------------------------
/share/icons/application/16x16/actions/password-copy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/actions/password-copy.png
--------------------------------------------------------------------------------
/share/icons/application/16x16/actions/system-search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/actions/system-search.png
--------------------------------------------------------------------------------
/share/icons/application/16x16/actions/username-copy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/actions/username-copy.png
--------------------------------------------------------------------------------
/share/icons/application/22x22/actions/document-open.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/22x22/actions/document-open.png
--------------------------------------------------------------------------------
/share/icons/application/22x22/actions/document-save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/22x22/actions/document-save.png
--------------------------------------------------------------------------------
/share/icons/application/22x22/actions/password-copy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/22x22/actions/password-copy.png
--------------------------------------------------------------------------------
/share/icons/application/22x22/actions/system-search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/22x22/actions/system-search.png
--------------------------------------------------------------------------------
/share/icons/application/22x22/actions/username-copy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/22x22/actions/username-copy.png
--------------------------------------------------------------------------------
/share/icons/application/22x22/status/dialog-warning.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/22x22/status/dialog-warning.png
--------------------------------------------------------------------------------
/share/icons/application/16x16/actions/application-exit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/actions/application-exit.png
--------------------------------------------------------------------------------
/share/icons/application/16x16/actions/document-encrypt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/actions/document-encrypt.png
--------------------------------------------------------------------------------
/share/icons/application/16x16/actions/document-save-as.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/actions/document-save-as.png
--------------------------------------------------------------------------------
/share/icons/application/16x16/actions/password-generate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/actions/password-generate.png
--------------------------------------------------------------------------------
/share/icons/application/16x16/actions/password-show-off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/actions/password-show-off.png
--------------------------------------------------------------------------------
/share/icons/application/16x16/actions/password-show-on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/actions/password-show-on.png
--------------------------------------------------------------------------------
/share/icons/application/22x22/actions/document-encrypt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/22x22/actions/document-encrypt.png
--------------------------------------------------------------------------------
/share/icons/application/22x22/status/dialog-information.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/22x22/status/dialog-information.png
--------------------------------------------------------------------------------
/share/icons/application/16x16/actions/database-change-key.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/actions/database-change-key.png
--------------------------------------------------------------------------------
/share/icons/application/16x16/mimetypes/application-x-keepassx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/mimetypes/application-x-keepassx.png
--------------------------------------------------------------------------------
/share/icons/application/22x22/mimetypes/application-x-keepassx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/22x22/mimetypes/application-x-keepassx.png
--------------------------------------------------------------------------------
/share/icons/application/32x32/mimetypes/application-x-keepassx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/32x32/mimetypes/application-x-keepassx.png
--------------------------------------------------------------------------------
/share/icons/application/64x64/mimetypes/application-x-keepassx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/64x64/mimetypes/application-x-keepassx.png
--------------------------------------------------------------------------------
/share/icons/application/128x128/mimetypes/application-x-keepassx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/128x128/mimetypes/application-x-keepassx.png
--------------------------------------------------------------------------------
/share/icons/application/16x16/actions/edit-clear-locationbar-ltr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/actions/edit-clear-locationbar-ltr.png
--------------------------------------------------------------------------------
/share/icons/application/16x16/actions/edit-clear-locationbar-rtl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kylemanna/keepassx/HEAD/share/icons/application/16x16/actions/edit-clear-locationbar-rtl.png
--------------------------------------------------------------------------------
/src/version.h.cmake:
--------------------------------------------------------------------------------
1 | #define GIT_HEAD "@GIT_HEAD@"
2 | #define GIT_DESCRIBE "@GIT_DESCRIBE@"
3 |
4 | #define DIST_HASH "94cbacb2e9d8ef68e72bb2f3fc83770783a742b7"
5 | #define DIST_DATE "1490200660"
6 |
--------------------------------------------------------------------------------
/tests/data/BrokenNoGroupUuid.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Test
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/tests/data/FileKeyXmlBrokenBase64.key:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 1.00
5 |
6 |
7 | yy
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.tx/config:
--------------------------------------------------------------------------------
1 | [main]
2 | host = https://www.transifex.com
3 |
4 | [keepassx.keepassx_ents]
5 | source_file = share/translations/keepassx_en.ts
6 | file_filter = share/translations/keepassx_.ts
7 | source_lang = en
8 | type = QT
9 |
--------------------------------------------------------------------------------
/src/autotype/test/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | set(autotype_test_SOURCES
2 | AutoTypeTest.cpp
3 | )
4 |
5 | add_library(keepassx-autotype-test MODULE ${autotype_test_SOURCES})
6 | target_link_libraries(keepassx-autotype-test testautotype Qt5::Core Qt5::Widgets)
7 |
--------------------------------------------------------------------------------
/tests/data/FileKeyXml.key:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 1.00
5 |
6 |
7 | nhNal+U9p6h1rWAAJ5YrNkMazMTZkIWLi3WC4JQv5jk=
8 |
9 |
10 |
--------------------------------------------------------------------------------
/tests/config-keepassx-tests.h.cmake:
--------------------------------------------------------------------------------
1 | /* config-keepassx-tests.h. Generated by cmake from config-keepassx-tests.h.cmake */
2 |
3 | #ifndef KEEPASSX_CONFIG_TESTS_H
4 | #define KEEPASSX_CONFIG_TESTS_H
5 |
6 | #define KEEPASSX_TEST_DATA_DIR "${KEEPASSX_TEST_DATA_DIR}"
7 |
8 | #endif // KEEPASSX_CONFIG_TESTS_H
9 |
--------------------------------------------------------------------------------
/src/core/Exporter.h:
--------------------------------------------------------------------------------
1 | #ifndef KEEPASSX_EXPORTER_H
2 | #define KEEPASSX_EXPORTER_H
3 |
4 | class Database;
5 | class Group;
6 |
7 | class Exporter
8 | {
9 | public:
10 | virtual Database* exportGroup(Group* group) = 0;
11 | virtual ~Exporter() {}
12 | };
13 |
14 | #endif // KEEPASSX_EXPORTER_H
15 |
--------------------------------------------------------------------------------
/share/linux/keepassx.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | KeePass 2 database
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/tests/data/BrokenTwoRootGroups.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | lmU+9n0aeESKZvcEze+bRg==
6 | Test
7 |
8 |
9 | AaUYVdXsI02h4T1RiAlgtg==
10 | Test
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/tests/data/BrokenTwoRoots.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | lmU+9n0aeESKZvcEze+bRg==
6 | Test
7 |
8 |
9 |
10 |
11 | AaUYVdXsI02h4T1RiAlgtg==
12 | Test
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/tests/data/BrokenNoEntryUuid.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | lmU+9n0aeESKZvcEze+bRg==
6 | Test
7 |
8 |
9 | Title
10 | Sample Entry 1
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/share/linux/keepassx.desktop:
--------------------------------------------------------------------------------
1 | [Desktop Entry]
2 | Name=KeePassX
3 | GenericName=Password Manager
4 | GenericName[de]=Passwortverwaltung
5 | GenericName[es]=Gestor de contraseñas
6 | GenericName[fr]=Gestionnaire de mot de passe
7 | GenericName[ru]=менеджер паролей
8 | Exec=keepassx %f
9 | Icon=keepassx
10 | Terminal=false
11 | Type=Application
12 | Categories=Qt;Utility;
13 | MimeType=application/x-keepass2;
14 |
--------------------------------------------------------------------------------
/share/translations/update.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | BASEDIR=$(dirname $0)
4 |
5 | cd $BASEDIR/../..
6 |
7 | echo Updating source file
8 | lupdate -no-ui-lines -disable-heuristic similartext -locations none -no-obsolete src -ts share/translations/keepassx_en.ts
9 | lupdate -no-ui-lines -disable-heuristic similartext -locations none -pluralonly src -ts share/translations/keepassx_en_plurals.ts
10 |
11 | echo Pulling translations from Transifex
12 | tx pull -a --minimum-perc=80
13 |
--------------------------------------------------------------------------------
/src/autotype/xcb/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | include_directories(SYSTEM ${X11_X11_INCLUDE_PATH})
2 |
3 | set(autotype_XCB_SOURCES
4 | AutoTypeXCB.cpp
5 | )
6 |
7 | add_library(keepassx-autotype-xcb MODULE ${autotype_XCB_SOURCES})
8 | target_link_libraries(keepassx-autotype-xcb Qt5::Core Qt5::Widgets Qt5::X11Extras ${X11_X11_LIB} ${X11_Xi_LIB} ${X11_XTest_LIB})
9 | install(TARGETS keepassx-autotype-xcb
10 | BUNDLE DESTINATION . COMPONENT Runtime
11 | LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR} COMPONENT Runtime)
12 |
--------------------------------------------------------------------------------
/tests/data/BrokenGroupReference.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | True
5 | 6w7wZdhAp0qVlXjkemuCYw==
6 |
7 |
8 |
9 | lmU+9n0aeESKZvcEze+bRg==
10 | Test
11 |
12 | AaUYVdXsI02h4T1RiAlgtg==
13 |
14 | Title
15 | Sample Entry 1
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/gui/WelcomeWidget.ui:
--------------------------------------------------------------------------------
1 |
2 |
3 | WelcomeWidget
4 |
5 |
6 |
7 |
8 |
9 | Welcome!
10 |
11 |
12 | Qt::AlignCenter
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/autotype/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | if(UNIX AND NOT APPLE)
2 | find_package(X11)
3 | find_package(Qt5X11Extras 5.2)
4 | add_feature_info(libXi X11_Xi_FOUND "The X11 Xi Protocol library is required for auto-type")
5 | add_feature_info(libXtest X11_XTest_FOUND "The X11 XTEST Protocol library is required for auto-type")
6 | add_feature_info(Qt5X11Extras Qt5X11Extras_FOUND "The Qt5X11Extras library is required for auto-type")
7 |
8 | if(X11_FOUND AND X11_Xi_FOUND AND X11_XTest_FOUND AND Qt5X11Extras_FOUND)
9 | add_subdirectory(xcb)
10 | endif()
11 | endif()
12 |
13 | if(WITH_TESTS)
14 | add_subdirectory(test)
15 | endif()
16 |
--------------------------------------------------------------------------------
/src/config-keepassx.h.cmake:
--------------------------------------------------------------------------------
1 | /* config-keepassx.h. Generated by cmake from config-keepassx.h.cmake */
2 |
3 | #ifndef KEEPASSX_CONFIG_KEEPASSX_H
4 | #define KEEPASSX_CONFIG_KEEPASSX_H
5 |
6 | #define KEEPASSX_VERSION "${KEEPASSX_VERSION}"
7 |
8 | #define KEEPASSX_SOURCE_DIR "${CMAKE_SOURCE_DIR}"
9 | #define KEEPASSX_BINARY_DIR "${CMAKE_BINARY_DIR}"
10 |
11 | #define KEEPASSX_PREFIX_DIR "${CMAKE_INSTALL_PREFIX}"
12 | #define KEEPASSX_PLUGIN_DIR "${PLUGIN_INSTALL_DIR}"
13 | #define KEEPASSX_DATA_DIR "${DATA_INSTALL_DIR}"
14 |
15 | #cmakedefine HAVE_PR_SET_DUMPABLE 1
16 | #cmakedefine HAVE_RLIMIT_CORE 1
17 | #cmakedefine HAVE_PT_DENY_ATTACH 1
18 |
19 | #endif // KEEPASSX_CONFIG_KEEPASSX_H
20 |
--------------------------------------------------------------------------------
/INSTALL:
--------------------------------------------------------------------------------
1 | Building:
2 | =========
3 | mkdir build
4 | cd build
5 | cmake [CMAKE PARAMETERS] ..
6 | make [-jX]
7 |
8 | Common cmake parameters:
9 | ========================
10 | -DCMAKE_INSTALL_PREFIX=/usr/local
11 | -DCMAKE_VERBOSE_MAKEFILE=ON
12 | -DCMAKE_BUILD_TYPE=
13 | -DWITH_GUI_TESTS=ON
14 |
15 | Installing:
16 | ===========
17 | make install [DESTDIR=X]
18 |
19 | Create a bundle on Mac:
20 | make package
21 |
22 | Run tests:
23 | ==========
24 | make test [CTEST_OUTPUT_ON_FAILURE=1] [ARGS+=-jX] [ARGS+="-E testgui"]
25 |
26 | OS specific instructions:
27 | =========================
28 | https://www.keepassx.org/dev/projects/keepassx/wiki/Install_instructions
29 |
--------------------------------------------------------------------------------
/tests/data/BrokenDeletedObjects.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | lmU+9n0aeESKZvcEze+bRg==
6 | Test
7 |
8 | AaUYVdXsI02h4T1RiAlgtg==
9 |
10 | Title
11 | Sample Entry 1
12 |
13 |
14 |
15 |
16 |
17 |
18 | 2010-08-25T16:14:12Z
19 |
20 |
21 |
22 | 5K/bzWCSmkCv5OZxYl4N/w==
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/tests/gui/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2011 Felix Geyer
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 2 or (at your option)
6 | # version 3 of the License.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | add_unit_test(NAME testgui SOURCES TestGui.cpp LIBS ${TEST_LIBRARIES})
17 |
18 | add_unit_test(NAME testguipixmaps SOURCES TestGuiPixmaps.cpp LIBS ${TEST_LIBRARIES})
19 |
--------------------------------------------------------------------------------
/src/keys/Key.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_KEY_H
19 | #define KEEPASSX_KEY_H
20 |
21 | #include
22 |
23 | class Key
24 | {
25 | public:
26 | virtual ~Key() {}
27 | virtual QByteArray rawKey() const = 0;
28 | virtual Key* clone() const = 0;
29 | };
30 |
31 | #endif // KEEPASSX_KEY_H
32 |
--------------------------------------------------------------------------------
/src/gui/WelcomeWidget.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #include "WelcomeWidget.h"
19 | #include "ui_WelcomeWidget.h"
20 |
21 | WelcomeWidget::WelcomeWidget(QWidget* parent)
22 | : QWidget(parent)
23 | , m_ui(new Ui::WelcomeWidget())
24 | {
25 | m_ui->setupUi(this);
26 | }
27 |
28 | WelcomeWidget::~WelcomeWidget()
29 | {
30 | }
31 |
--------------------------------------------------------------------------------
/tests/TestCryptoHash.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_TESTCRYPTOHASH_H
19 | #define KEEPASSX_TESTCRYPTOHASH_H
20 |
21 | #include
22 |
23 | class TestCryptoHash : public QObject
24 | {
25 | Q_OBJECT
26 |
27 | private Q_SLOTS:
28 | void initTestCase();
29 | void test();
30 | };
31 |
32 | #endif // KEEPASSX_TESTCRYPTOHASH_H
33 |
--------------------------------------------------------------------------------
/tests/TestGroupModel.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_TESTGROUPMODEL_H
19 | #define KEEPASSX_TESTGROUPMODEL_H
20 |
21 | #include
22 |
23 | class TestGroupModel : public QObject
24 | {
25 | Q_OBJECT
26 |
27 | private Q_SLOTS:
28 | void initTestCase();
29 | void test();
30 | };
31 |
32 | #endif // KEEPASSX_TESTGROUPMODEL_H
33 |
--------------------------------------------------------------------------------
/utils/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2010 Felix Geyer
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 2 or (at your option)
6 | # version 3 of the License.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | include_directories(../src)
17 |
18 | add_executable(kdbx-extract kdbx-extract.cpp)
19 | target_link_libraries(kdbx-extract
20 | keepassx_core
21 | Qt5::Core
22 | Qt5::Concurrent
23 | Qt5::Widgets
24 | ${GCRYPT_LIBRARIES}
25 | ${ZLIB_LIBRARIES})
26 |
--------------------------------------------------------------------------------
/tests/TestKeePass2RandomStream.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_TESTKEEPASS2RANDOMSTREAM_H
19 | #define KEEPASSX_TESTKEEPASS2RANDOMSTREAM_H
20 |
21 | #include
22 |
23 | class TestKeePass2RandomStream : public QObject
24 | {
25 | Q_OBJECT
26 |
27 | private Q_SLOTS:
28 | void initTestCase();
29 | void test();
30 | };
31 |
32 | #endif // KEEPASSX_TESTKEEPASS2RANDOMSTREAM_H
33 |
--------------------------------------------------------------------------------
/src/core/ToDbExporter.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 Felix Geyer
3 | * Copyright (C) 2014 Florian Geyer
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 2 or (at your option)
8 | * version 3 of the License.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | #ifndef KEEPASSX_TODBEXPORTER_H
20 | #define KEEPASSX_TODBEXPORTER_H
21 |
22 | #include "core/Exporter.h"
23 |
24 | class Database;
25 | class Group;
26 |
27 | class ToDbExporter : Exporter
28 | {
29 | public:
30 | Database* exportGroup(Group* group);
31 | };
32 |
33 | #endif // KEEPASSX_TODBEXPORTER_H
34 |
--------------------------------------------------------------------------------
/tests/TestExporter.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 Felix Geyer
3 | * Copyright (C) 2014 Florian Geyer
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 2 or (at your option)
8 | * version 3 of the License.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | #ifndef KEEPASSX_TESTEXPORTER_H
20 | #define KEEPASSX_TESTEXPORTER_H
21 |
22 | #include
23 |
24 | class TestExporter : public QObject
25 | {
26 | Q_OBJECT
27 |
28 | private Q_SLOTS:
29 | void initTestCase();
30 | void testToDbExporter();
31 | };
32 |
33 | #endif // KEEPASSX_TESTEXPORTER_H
34 |
--------------------------------------------------------------------------------
/tests/TestEntry.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2013 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_TESTENTRY_H
19 | #define KEEPASSX_TESTENTRY_H
20 |
21 | #include
22 |
23 | class Entry;
24 |
25 | class TestEntry : public QObject
26 | {
27 | Q_OBJECT
28 |
29 | private Q_SLOTS:
30 | void initTestCase();
31 | void testHistoryItemDeletion();
32 | void testCopyDataFrom();
33 | void testClone();
34 | };
35 |
36 | #endif // KEEPASSX_TESTENTRY_H
37 |
--------------------------------------------------------------------------------
/tests/TestModified.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_TESTMODIFIED_H
19 | #define KEEPASSX_TESTMODIFIED_H
20 |
21 | #include
22 |
23 | class TestModified : public QObject
24 | {
25 | Q_OBJECT
26 |
27 | private Q_SLOTS:
28 | void initTestCase();
29 | void testSignals();
30 | void testGroupSets();
31 | void testEntrySets();
32 | void testHistoryItem();
33 | };
34 |
35 | #endif // KEEPASSX_TESTMODIFIED_H
36 |
--------------------------------------------------------------------------------
/src/gui/UnlockDatabaseWidget.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_UNLOCKDATABASEWIDGET_H
19 | #define KEEPASSX_UNLOCKDATABASEWIDGET_H
20 |
21 | #include "gui/DatabaseOpenWidget.h"
22 |
23 | class UnlockDatabaseWidget : public DatabaseOpenWidget
24 | {
25 | Q_OBJECT
26 |
27 | public:
28 | explicit UnlockDatabaseWidget(QWidget* parent = nullptr);
29 | void clearForms();
30 | };
31 |
32 | #endif // KEEPASSX_UNLOCKDATABASEWIDGET_H
33 |
--------------------------------------------------------------------------------
/src/core/ListDeleter.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_LISTDELETER_H
19 | #define KEEPASSX_LISTDELETER_H
20 |
21 | #include
22 |
23 | template
24 | class ListDeleter
25 | {
26 | public:
27 | inline explicit ListDeleter(QList* list) : m_list(list) {}
28 | inline ~ListDeleter() {
29 | qDeleteAll(*m_list);
30 | }
31 |
32 | private:
33 | QList* m_list;
34 | };
35 |
36 | #endif // KEEPASSX_LISTDELETER_H
37 |
--------------------------------------------------------------------------------
/tests/TestHashedBlockStream.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_TESTHASHEDBLOCKSTREAM_H
19 | #define KEEPASSX_TESTHASHEDBLOCKSTREAM_H
20 |
21 | #include
22 |
23 | class TestHashedBlockStream : public QObject
24 | {
25 | Q_OBJECT
26 |
27 | private Q_SLOTS:
28 | void initTestCase();
29 | void testWriteRead();
30 | void testReset();
31 | void testWriteFailure();
32 | };
33 |
34 | #endif // KEEPASSX_TESTHASHEDBLOCKSTREAM_H
35 |
--------------------------------------------------------------------------------
/src/gui/KeePass1OpenWidget.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_KEEPASS1OPENWIDGET_H
19 | #define KEEPASSX_KEEPASS1OPENWIDGET_H
20 |
21 | #include "gui/DatabaseOpenWidget.h"
22 |
23 | class KeePass1OpenWidget : public DatabaseOpenWidget
24 | {
25 | Q_OBJECT
26 |
27 | public:
28 | explicit KeePass1OpenWidget(QWidget* parent = nullptr);
29 |
30 | protected:
31 | void openDatabase() override;
32 | };
33 |
34 | #endif // KEEPASSX_KEEPASS1OPENWIDGET_H
35 |
--------------------------------------------------------------------------------
/src/keys/CompositeKey_p.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_COMPOSITEKEY_P_H
19 | #define KEEPASSX_COMPOSITEKEY_P_H
20 |
21 | #include
22 |
23 | class TransformKeyBenchmarkThread : public QThread
24 | {
25 | Q_OBJECT
26 |
27 | public:
28 | explicit TransformKeyBenchmarkThread(int msec);
29 | int rounds();
30 |
31 | protected:
32 | void run();
33 |
34 | private:
35 | int m_msec;
36 | int m_rounds;
37 | };
38 |
39 | #endif // KEEPASSX_COMPOSITEKEY_P_H
40 |
--------------------------------------------------------------------------------
/src/keys/ChallengeResponseKey.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 Kyle Manna
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_CHALLENGE_RESPONSE_KEY_H
19 | #define KEEPASSX_CHALLENGE_RESPONSE_KEY_H
20 |
21 | #include
22 |
23 | class ChallengeResponseKey
24 | {
25 | public:
26 | virtual ~ChallengeResponseKey() {}
27 | virtual QByteArray rawKey() const = 0;
28 | virtual ChallengeResponseKey* clone() const = 0;
29 | virtual bool challenge(const QByteArray& challenge) = 0;
30 | };
31 |
32 | #endif // KEEPASSX_CHALLENGE_RESPONSE_KEY_H
33 |
--------------------------------------------------------------------------------
/LICENSE.NOKIA-LGPL-EXCEPTION:
--------------------------------------------------------------------------------
1 | Nokia Qt LGPL Exception version 1.1
2 |
3 | As an additional permission to the GNU Lesser General Public License
4 | version 2.1, the object code form of a "work that uses the Library"
5 | may incorporate material from a header file that is part of the
6 | Library. You may distribute such object code under terms of your
7 | choice, provided that:
8 | (i) the header files of the Library have not been modified; and
9 | (ii) the incorporated material is limited to numerical parameters,
10 | data structure layouts, accessors, macros, inline functions and
11 | templates; and
12 | (iii) you comply with the terms of Section 6 of the GNU
13 | Lesser General Public License version 2.1.
14 |
15 | Moreover, you may apply this exception to a modified version of the
16 | Library, provided that such modification does not involve copying
17 | material from the Library into the modified Library?s header files
18 | unless such material is limited to (i) numerical parameters; (ii) data
19 | structure layouts; (iii) accessors; and (iv) small macros, templates
20 | and inline functions of five lines or less in length.
21 |
22 | Furthermore, you are not required to apply this additional permission
23 | to a modified version of the Library.
24 |
--------------------------------------------------------------------------------
/tests/TestKeys.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_TESTKEYS_H
19 | #define KEEPASSX_TESTKEYS_H
20 |
21 | #include
22 |
23 | class TestKeys : public QObject
24 | {
25 | Q_OBJECT
26 |
27 | private Q_SLOTS:
28 | void initTestCase();
29 | void testComposite();
30 | void testFileKey();
31 | void testFileKey_data();
32 | void testCreateFileKey();
33 | void testFileKeyError();
34 | void benchmarkTransformKey();
35 | };
36 |
37 | #endif // KEEPASSX_TESTKEYS_H
38 |
--------------------------------------------------------------------------------
/src/gui/WelcomeWidget.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_WELCOMEWIDGET_H
19 | #define KEEPASSX_WELCOMEWIDGET_H
20 |
21 | #include
22 |
23 | namespace Ui {
24 | class WelcomeWidget;
25 | }
26 |
27 | class WelcomeWidget : public QWidget
28 | {
29 | Q_OBJECT
30 |
31 | public:
32 | explicit WelcomeWidget(QWidget* parent = nullptr);
33 | ~WelcomeWidget();
34 |
35 | private:
36 | const QScopedPointer m_ui;
37 | };
38 |
39 | #endif // KEEPASSX_WELCOMEWIDGET_H
40 |
--------------------------------------------------------------------------------
/src/gui/AboutDialog.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_ABOUTDIALOG_H
19 | #define KEEPASSX_ABOUTDIALOG_H
20 |
21 | #include
22 | #include
23 |
24 | namespace Ui {
25 | class AboutDialog;
26 | }
27 |
28 | class AboutDialog : public QDialog
29 | {
30 | Q_OBJECT
31 |
32 | public:
33 | explicit AboutDialog(QWidget* parent = nullptr);
34 | ~AboutDialog();
35 |
36 | private:
37 | QScopedPointer m_ui;
38 | };
39 |
40 | #endif // KEEPASSX_ABOUTDIALOG_H
41 |
--------------------------------------------------------------------------------
/src/keys/PasswordKey.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_PASSWORDKEY_H
19 | #define KEEPASSX_PASSWORDKEY_H
20 |
21 | #include
22 |
23 | #include "keys/Key.h"
24 |
25 | class PasswordKey : public Key
26 | {
27 | public:
28 | PasswordKey();
29 | explicit PasswordKey(const QString& password);
30 | QByteArray rawKey() const;
31 | void setPassword(const QString& password);
32 | PasswordKey* clone() const;
33 |
34 | private:
35 | QByteArray m_key;
36 | };
37 |
38 | #endif // KEEPASSX_PASSWORDKEY_H
39 |
--------------------------------------------------------------------------------
/tests/TestGroup.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_TESTGROUP_H
19 | #define KEEPASSX_TESTGROUP_H
20 |
21 | #include
22 |
23 | class TestGroup : public QObject
24 | {
25 | Q_OBJECT
26 |
27 | private Q_SLOTS:
28 | void initTestCase();
29 | void testParenting();
30 | void testSignals();
31 | void testEntries();
32 | void testDeleteSignals();
33 | void testCopyCustomIcon();
34 | void testClone();
35 | void testCopyCustomIcons();
36 | };
37 |
38 | #endif // KEEPASSX_TESTGROUP_H
39 |
--------------------------------------------------------------------------------
/tests/TestSymmetricCipher.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_TESTSYMMETRICCIPHER_H
19 | #define KEEPASSX_TESTSYMMETRICCIPHER_H
20 |
21 | #include
22 |
23 | class TestSymmetricCipher : public QObject
24 | {
25 | Q_OBJECT
26 |
27 | private Q_SLOTS:
28 | void initTestCase();
29 | void testAes256CbcEncryption();
30 | void testAes256CbcDecryption();
31 | void testSalsa20();
32 | void testPadding();
33 | void testStreamReset();
34 | };
35 |
36 | #endif // KEEPASSX_TESTSYMMETRICCIPHER_H
37 |
--------------------------------------------------------------------------------
/share/translations/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2014 Felix Geyer
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 2 or (at your option)
6 | # version 3 of the License.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | file(GLOB TRANSLATION_FILES *.ts)
17 | get_filename_component(TRANSLATION_EN_ABS keepassx_en.ts ABSOLUTE)
18 | list(REMOVE_ITEM TRANSLATION_FILES keepassx_en.ts)
19 | list(REMOVE_ITEM TRANSLATION_FILES ${TRANSLATION_EN_ABS})
20 | message(STATUS "${TRANSLATION_FILES}")
21 |
22 | qt5_add_translation(QM_FILES ${TRANSLATION_FILES})
23 |
24 | install(FILES ${QM_FILES} DESTINATION ${DATA_INSTALL_DIR}/translations)
25 | add_custom_target(translations DEPENDS ${QM_FILES})
26 | add_dependencies(${PROGNAME} translations)
27 |
--------------------------------------------------------------------------------
/tests/TestKeePass2Reader.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_TESTKEEPASS2READER_H
19 | #define KEEPASSX_TESTKEEPASS2READER_H
20 |
21 | #include
22 |
23 | class TestKeePass2Reader : public QObject
24 | {
25 | Q_OBJECT
26 |
27 | private Q_SLOTS:
28 | void initTestCase();
29 | void testNonAscii();
30 | void testCompressed();
31 | void testProtectedStrings();
32 | void testBrokenHeaderHash();
33 | void testFormat200();
34 | void testFormat300();
35 | };
36 |
37 | #endif // KEEPASSX_TESTKEEPASS2READER_H
38 |
--------------------------------------------------------------------------------
/src/gui/DialogyWidget.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_DIALOGYWIDGET_H
19 | #define KEEPASSX_DIALOGYWIDGET_H
20 |
21 | #include
22 | #include
23 |
24 | class DialogyWidget : public QWidget
25 | {
26 | Q_OBJECT
27 |
28 | public:
29 | explicit DialogyWidget(QWidget* parent = nullptr);
30 |
31 | protected:
32 | void keyPressEvent(QKeyEvent* e) override;
33 |
34 | private:
35 | bool clickButton(QDialogButtonBox::StandardButton standardButton);
36 | };
37 |
38 | #endif // KEEPASSX_DIALOGYWIDGET_H
39 |
--------------------------------------------------------------------------------
/src/autotype/AutoTypeSelectView.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_AUTOTYPESELECTVIEW_H
19 | #define KEEPASSX_AUTOTYPESELECTVIEW_H
20 |
21 | #include "gui/entry/EntryView.h"
22 |
23 | class Entry;
24 |
25 | class AutoTypeSelectView : public EntryView
26 | {
27 | Q_OBJECT
28 |
29 | public:
30 | explicit AutoTypeSelectView(QWidget* parent = nullptr);
31 |
32 | protected:
33 | void mouseMoveEvent(QMouseEvent* event) override;
34 |
35 | private Q_SLOTS:
36 | void selectFirstEntry();
37 | };
38 |
39 | #endif // KEEPASSX_AUTOTYPESELECTVIEW_H
40 |
--------------------------------------------------------------------------------
/src/autotype/WindowSelectComboBox.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_WINDOWSELECTCOMBOBOX_H
19 | #define KEEPASSX_WINDOWSELECTCOMBOBOX_H
20 |
21 | #include
22 |
23 | class WindowSelectComboBox : public QComboBox
24 | {
25 | Q_OBJECT
26 |
27 | public:
28 | explicit WindowSelectComboBox(QWidget* parent = nullptr);
29 | void refreshWindowList();
30 |
31 | void showPopup() override;
32 | QSize sizeHint() const override;
33 | QSize minimumSizeHint() const override;
34 | };
35 |
36 | #endif // KEEPASSX_WINDOWSELECTCOMBOBOX_H
37 |
--------------------------------------------------------------------------------
/tests/gui/TestGuiPixmaps.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_TESTGUIPIXMAPS_H
19 | #define KEEPASSX_TESTGUIPIXMAPS_H
20 |
21 | #include
22 | #include
23 | #include
24 |
25 | class TestGuiPixmaps : public QObject
26 | {
27 | Q_OBJECT
28 |
29 | private Q_SLOTS:
30 | void initTestCase();
31 | void testDatabaseIcons();
32 | void testEntryIcons();
33 | void testGroupIcons();
34 |
35 | private:
36 | void compareImages(const QPixmap& pixmap, const QImage& image);
37 | };
38 |
39 | #endif // KEEPASSX_TESTGUIPIXMAPS_H
40 |
--------------------------------------------------------------------------------
/tests/TestDeletedObjects.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_TESTDELETEDOBJECTS_H
19 | #define KEEPASSX_TESTDELETEDOBJECTS_H
20 |
21 | #include
22 |
23 | class Database;
24 |
25 | class TestDeletedObjects : public QObject
26 | {
27 | Q_OBJECT
28 |
29 | private:
30 | void createAndDelete(Database* db, int delObjectsSize);
31 |
32 | private Q_SLOTS:
33 | void initTestCase();
34 | void testDeletedObjectsFromFile();
35 | void testDeletedObjectsFromNewDb();
36 | void testDatabaseChange();
37 | };
38 |
39 | #endif // KEEPASSX_TESTDELETEDOBJECTS_H
40 |
--------------------------------------------------------------------------------
/src/keys/PasswordKey.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #include "PasswordKey.h"
19 |
20 | #include "crypto/CryptoHash.h"
21 |
22 | PasswordKey::PasswordKey()
23 | {
24 | }
25 |
26 | PasswordKey::PasswordKey(const QString& password)
27 | {
28 | setPassword(password);
29 | }
30 |
31 | QByteArray PasswordKey::rawKey() const
32 | {
33 | return m_key;
34 | }
35 |
36 | void PasswordKey::setPassword(const QString& password)
37 | {
38 | m_key = CryptoHash::hash(password.toUtf8(), CryptoHash::Sha256);
39 | }
40 |
41 | PasswordKey* PasswordKey::clone() const
42 | {
43 | return new PasswordKey(*this);
44 | }
45 |
--------------------------------------------------------------------------------
/src/core/Translator.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_TRANSLATOR_H
19 | #define KEEPASSX_TRANSLATOR_H
20 |
21 | #include
22 | #include
23 |
24 | class Translator
25 | {
26 | public:
27 | static void installTranslator();
28 | static QList > availableLanguages();
29 |
30 | private:
31 | static bool installTranslator(const QString& language);
32 | static bool installTranslator(const QString& language, const QString& path);
33 | static bool installQtTranslator(const QString& language);
34 | };
35 |
36 | #endif // KEEPASSX_TRANSLATOR_H
37 |
--------------------------------------------------------------------------------
/src/gui/Application.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Tobias Tangemann
3 | * Copyright (C) 2012 Felix Geyer
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 2 or (at your option)
8 | * version 3 of the License.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | #ifndef KEEPASSX_APPLICATION_H
20 | #define KEEPASSX_APPLICATION_H
21 |
22 | #include
23 |
24 | class Application : public QApplication
25 | {
26 | Q_OBJECT
27 |
28 | public:
29 | Application(int& argc, char** argv);
30 | void setMainWindow(QWidget* mainWindow);
31 |
32 | bool event(QEvent* event) override;
33 |
34 | Q_SIGNALS:
35 | void openFile(const QString& filename);
36 |
37 | private:
38 | QWidget* m_mainWindow;
39 | };
40 |
41 | #endif // KEEPASSX_APPLICATION_H
42 |
--------------------------------------------------------------------------------
/src/streams/StoreDataStream.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_STOREDATASTREAM_H
19 | #define KEEPASSX_STOREDATASTREAM_H
20 |
21 | #include "streams/LayeredStream.h"
22 |
23 | class StoreDataStream : public LayeredStream
24 | {
25 | Q_OBJECT
26 |
27 | public:
28 | explicit StoreDataStream(QIODevice* baseDevice);
29 | bool open(QIODevice::OpenMode mode) override;
30 | QByteArray storedData() const;
31 |
32 | protected:
33 | qint64 readData(char* data, qint64 maxSize) override;
34 |
35 | private:
36 | QByteArray m_storedData;
37 | };
38 |
39 | #endif // KEEPASSX_STOREDATASTREAM_H
40 |
--------------------------------------------------------------------------------
/tests/TestEntryModel.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_TESTENTRYMODEL_H
19 | #define KEEPASSX_TESTENTRYMODEL_H
20 |
21 | #include
22 |
23 | class TestEntryModel : public QObject
24 | {
25 | Q_OBJECT
26 |
27 | private Q_SLOTS:
28 | void initTestCase();
29 | void test();
30 | void testAttachmentsModel();
31 | void testAttributesModel();
32 | void testDefaultIconModel();
33 | void testCustomIconModel();
34 | void testAutoTypeAssociationsModel();
35 | void testProxyModel();
36 | void testDatabaseDelete();
37 | };
38 |
39 | #endif // KEEPASSX_TESTENTRYMODEL_H
40 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | os:
2 | - linux
3 | - osx
4 | compiler:
5 | - gcc
6 | - clang
7 | language: cpp
8 | sudo: required
9 | dist: trusty
10 | install:
11 | - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq update; fi
12 | - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq install cmake qtbase5-dev libqt5x11extras5-dev qttools5-dev qttools5-dev-tools libgcrypt20-dev zlib1g-dev libxtst-dev xvfb; fi
13 | - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
14 | - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew ls | grep -wq cmake || brew install cmake; fi
15 | - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew ls | grep -wq qt5 || brew install qt5; fi
16 | - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew ls | grep -wq libgcrypt || brew install libgcrypt; fi
17 | before_script:
18 | - if [ "$TRAVIS_OS_NAME" = "osx" ]; then CMAKE_ARGS="-DCMAKE_PREFIX_PATH=/usr/local/opt/qt5"; fi
19 | - mkdir build && pushd build
20 | script:
21 | - cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_GUI_TESTS=ON $CMAKE_ARGS ..
22 | - make
23 | - if [ "$TRAVIS_OS_NAME" = "linux" ]; then make test ARGS+="-E testgui --output-on-failure"; fi
24 | - if [ "$TRAVIS_OS_NAME" = "linux" ]; then xvfb-run -a --server-args="-screen 0 800x600x24" make test ARGS+="-R testgui --output-on-failure"; fi
25 | - if [ "$TRAVIS_OS_NAME" = "osx" ]; then make test ARGS+="--output-on-failure"; fi
26 |
--------------------------------------------------------------------------------
/src/core/Global.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
4 | * Copyright (C) 2012 Intel Corporation
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 2 or (at your option)
9 | * version 3 of the License.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program. If not, see .
18 | */
19 |
20 | #ifndef KEEPASSX_GLOBAL_H
21 | #define KEEPASSX_GLOBAL_H
22 |
23 | #include
24 |
25 | #if defined(Q_OS_WIN)
26 | # if defined(KEEPASSX_BUILDING_CORE)
27 | # define KEEPASSX_EXPORT Q_DECL_EXPORT
28 | # else
29 | # define KEEPASSX_EXPORT Q_DECL_IMPORT
30 | # endif
31 | #else
32 | # define KEEPASSX_EXPORT Q_DECL_EXPORT
33 | #endif
34 |
35 | #ifndef QUINT32_MAX
36 | #define QUINT32_MAX 4294967295U
37 | #endif
38 |
39 | #endif // KEEPASSX_GLOBAL_H
40 |
--------------------------------------------------------------------------------
/src/gui/DatabaseRepairWidget.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_DATABASEREPAIRWIDGET_H
19 | #define KEEPASSX_DATABASEREPAIRWIDGET_H
20 |
21 | #include "gui/DatabaseOpenWidget.h"
22 |
23 | class DatabaseRepairWidget : public DatabaseOpenWidget
24 | {
25 | Q_OBJECT
26 |
27 | public:
28 | explicit DatabaseRepairWidget(QWidget* parent = Q_NULLPTR);
29 |
30 | Q_SIGNALS:
31 | void success();
32 | void error();
33 |
34 | protected:
35 | void openDatabase() Q_DECL_OVERRIDE;
36 |
37 | private Q_SLOTS:
38 | void processEditFinished(bool result);
39 | };
40 |
41 | #endif // KEEPASSX_DATABASEREPAIRWIDGET_H
42 |
--------------------------------------------------------------------------------
/src/format/KeePass1.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_KEEPASS1_H
19 | #define KEEPASSX_KEEPASS1_H
20 |
21 | #include
22 |
23 | namespace KeePass1
24 | {
25 | const quint32 SIGNATURE_1 = 0x9AA2D903;
26 | const quint32 SIGNATURE_2 = 0xB54BFB65;
27 | const quint32 PWM_DBVER_DW = 0x00030002;
28 | const quint32 FILE_VERSION = 0x00030002;
29 | const quint32 FILE_VERSION_CRITICAL_MASK = 0xFFFFFF00;
30 |
31 | const QSysInfo::Endian BYTEORDER = QSysInfo::LittleEndian;
32 |
33 | enum EncryptionFlags
34 | {
35 | Rijndael = 2,
36 | Twofish = 8
37 | };
38 | }
39 |
40 | #endif // KEEPASSX_KEEPASS1_H
41 |
--------------------------------------------------------------------------------
/tests/FailDevice.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_FAILDEVICE_H
19 | #define KEEPASSX_FAILDEVICE_H
20 |
21 | #include
22 |
23 | class FailDevice : public QBuffer
24 | {
25 | Q_OBJECT
26 |
27 | public:
28 | explicit FailDevice(int failAfter, QObject* parent = nullptr);
29 | bool open(QIODevice::OpenMode openMode) override;
30 |
31 | protected:
32 | qint64 readData(char* data, qint64 len) override;
33 | qint64 writeData(const char* data, qint64 len) override;
34 |
35 | private:
36 | int m_failAfter;
37 | int m_readCount;
38 | int m_writeCount;
39 | };
40 |
41 | #endif // KEEPASSX_FAILDEVICE_H
42 |
--------------------------------------------------------------------------------
/LICENSE.BSD:
--------------------------------------------------------------------------------
1 | Redistribution and use in source and binary forms, with or without
2 | modification, are permitted provided that the following conditions
3 | are met:
4 |
5 | 1. Redistributions of source code must retain the copyright
6 | notice, this list of conditions and the following disclaimer.
7 | 2. Redistributions in binary form must reproduce the copyright
8 | notice, this list of conditions and the following disclaimer in the
9 | documentation and/or other materials provided with the distribution.
10 | 3. The name of the author may not be used to endorse or promote products
11 | derived from this software without specific prior written permission.
12 |
13 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 | IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 |
24 |
--------------------------------------------------------------------------------
/LICENSE.BOOST-1.0:
--------------------------------------------------------------------------------
1 | Boost Software License - Version 1.0 - August 17th, 2003
2 |
3 | Permission is hereby granted, free of charge, to any person or organization
4 | obtaining a copy of the software and accompanying documentation covered by
5 | this license (the "Software") to use, reproduce, display, distribute,
6 | execute, and transmit the Software, and to prepare derivative works of the
7 | Software, and to permit third-parties to whom the Software is furnished to
8 | do so, all subject to the following:
9 |
10 | The copyright notices in the Software and this entire statement, including
11 | the above license grant, this restriction and the following disclaimer,
12 | must be included in all copies of the Software, in whole or in part, and
13 | all derivative works of the Software, unless such copies or derivative
14 | works are solely in the form of machine-executable object code generated by
15 | a source language processor.
16 |
17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
20 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
21 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
22 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23 | DEALINGS IN THE SOFTWARE.
24 |
--------------------------------------------------------------------------------
/tests/TestKeePass2Writer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_TESTKEEPASS2WRITER_H
19 | #define KEEPASSX_TESTKEEPASS2WRITER_H
20 |
21 | #include
22 |
23 | class Database;
24 |
25 | class TestKeePass2Writer : public QObject
26 | {
27 | Q_OBJECT
28 |
29 | private Q_SLOTS:
30 | void initTestCase();
31 | void testBasic();
32 | void testProtectedAttributes();
33 | void testAttachments();
34 | void testNonAsciiPasswords();
35 | void testDeviceFailure();
36 | void testRepair();
37 | void cleanupTestCase();
38 |
39 | private:
40 | Database* m_dbOrg;
41 | Database* m_dbTest;
42 | };
43 |
44 | #endif // KEEPASSX_TESTKEEPASS2WRITER_H
45 |
--------------------------------------------------------------------------------
/src/gui/LineEdit.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2007 Trolltech ASA
3 | * Copyright (C) 2012 Felix Geyer
4 | * Copyright (C) 2012 Florian Geyer
5 | *
6 | * This program is free software: you can redistribute it and/or modify
7 | * it under the terms of the GNU General Public License as published by
8 | * the Free Software Foundation, either version 2 or (at your option)
9 | * version 3 of the License.
10 | *
11 | * This program is distributed in the hope that it will be useful,
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 | * GNU General Public License for more details.
15 | *
16 | * You should have received a copy of the GNU General Public License
17 | * along with this program. If not, see .
18 | */
19 |
20 | #ifndef KEEPASSX_LINEEDIT_H
21 | #define KEEPASSX_LINEEDIT_H
22 |
23 | #include
24 |
25 | class QToolButton;
26 |
27 | class LineEdit : public QLineEdit
28 | {
29 | Q_OBJECT
30 |
31 | public:
32 | explicit LineEdit(QWidget* parent = nullptr);
33 |
34 | protected:
35 | void resizeEvent(QResizeEvent* event) override;
36 |
37 | private Q_SLOTS:
38 | void updateCloseButton(const QString& text);
39 |
40 | private:
41 | QToolButton* const m_clearButton;
42 | };
43 |
44 | #endif // KEEPASSX_LINEEDIT_H
45 |
--------------------------------------------------------------------------------
/tests/TestEntrySearcher.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 Florian Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 |
19 | #ifndef KEEPASSX_TESTENTRYSEARCHER_H
20 | #define KEEPASSX_TESTENTRYSEARCHER_H
21 |
22 | #include
23 |
24 | #include "core/EntrySearcher.h"
25 | #include "core/Group.h"
26 |
27 | class TestEntrySearcher : public QObject
28 | {
29 | Q_OBJECT
30 |
31 | private Q_SLOTS:
32 | void initTestCase();
33 | void cleanupTestCase();
34 |
35 | void testAndConcatenationInSearch();
36 | void testSearch();
37 | void testAllAttributesAreSearched();
38 |
39 | private:
40 | Group* m_groupRoot;
41 | EntrySearcher m_entrySearcher;
42 | QList m_searchResult;
43 | };
44 |
45 | #endif // KEEPASSX_TESTENTRYSEARCHER_H
46 |
--------------------------------------------------------------------------------
/src/autotype/test/AutoTypeTestInterface.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_AUTOTYPETESTINTERFACE_H
19 | #define KEEPASSX_AUTOTYPETESTINTERFACE_H
20 |
21 | #include "autotype/AutoTypeAction.h"
22 |
23 | class AutoTypeTestInterface
24 | {
25 | public:
26 | virtual ~AutoTypeTestInterface() {}
27 | virtual void setActiveWindowTitle(const QString& title) = 0;
28 |
29 | virtual QString actionChars() = 0;
30 | virtual int actionCount() = 0;
31 | virtual void clearActions() = 0;
32 |
33 | virtual QString keyToString(Qt::Key key) = 0;
34 | };
35 |
36 | Q_DECLARE_INTERFACE(AutoTypeTestInterface, "org.keepassx.AutoTypeTestInterface/1")
37 |
38 | #endif // KEEPASSX_AUTOTYPETESTINTERFACE_H
39 |
--------------------------------------------------------------------------------
/src/crypto/CryptoHash.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_CRYPTOHASH_H
19 | #define KEEPASSX_CRYPTOHASH_H
20 |
21 | #include
22 |
23 | class CryptoHashPrivate;
24 |
25 | class CryptoHash
26 | {
27 | public:
28 | enum Algorithm
29 | {
30 | Sha256
31 | };
32 |
33 | explicit CryptoHash(CryptoHash::Algorithm algo);
34 | ~CryptoHash();
35 | void addData(const QByteArray& data);
36 | void reset();
37 | QByteArray result() const;
38 |
39 | static QByteArray hash(const QByteArray& data, CryptoHash::Algorithm algo);
40 |
41 | private:
42 | CryptoHashPrivate* const d_ptr;
43 |
44 | Q_DECLARE_PRIVATE(CryptoHash)
45 | };
46 |
47 | #endif // KEEPASSX_CRYPTOHASH_H
48 |
--------------------------------------------------------------------------------
/src/streams/LayeredStream.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_LAYEREDSTREAM_H
19 | #define KEEPASSX_LAYEREDSTREAM_H
20 |
21 | #include
22 |
23 | class LayeredStream : public QIODevice
24 | {
25 | Q_OBJECT
26 |
27 | public:
28 | explicit LayeredStream(QIODevice* baseDevice);
29 | virtual ~LayeredStream();
30 |
31 | bool isSequential() const override;
32 | bool open(QIODevice::OpenMode mode) override;
33 |
34 | protected:
35 | qint64 readData(char* data, qint64 maxSize) override;
36 | qint64 writeData(const char* data, qint64 maxSize) override;
37 |
38 | QIODevice* const m_baseDevice;
39 |
40 | private Q_SLOTS:
41 | void closeStream();
42 | };
43 |
44 | #endif // KEEPASSX_LAYEREDSTREAM_H
45 |
--------------------------------------------------------------------------------
/tests/TestCsvExporter.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015 Florian Geyer
3 | * Copyright (C) 2015 Felix Geyer
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 2 or (at your option)
8 | * version 3 of the License.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | #ifndef KEEPASSX_TESTCSVEXPORTER_H
20 | #define KEEPASSX_TESTCSVEXPORTER_H
21 |
22 | #include
23 |
24 | class Database;
25 | class CsvExporter;
26 |
27 | class TestCsvExporter : public QObject
28 | {
29 | Q_OBJECT
30 |
31 | public:
32 | static const QString ExpectedHeaderLine;
33 |
34 | private Q_SLOTS:
35 | void init();
36 | void initTestCase();
37 | void cleanUp();
38 | void testExport();
39 | void testEmptyDatabase();
40 | void testNestedGroups();
41 |
42 | private:
43 | Database* m_db;
44 | CsvExporter* m_csvExporter;
45 | };
46 |
47 | #endif // KEEPASSX_TESTCSVEXPORTER_H
48 |
--------------------------------------------------------------------------------
/cmake/GetGitRevisionDescription.cmake.in:
--------------------------------------------------------------------------------
1 | #
2 | # Internal file for GetGitRevisionDescription.cmake
3 | #
4 | # Requires CMake 2.6 or newer (uses the 'function' command)
5 | #
6 | # Original Author:
7 | # 2009-2010 Ryan Pavlik
8 | # http://academic.cleardefinition.com
9 | # Iowa State University HCI Graduate Program/VRAC
10 | #
11 | # Copyright Iowa State University 2009-2010.
12 | # Distributed under the Boost Software License, Version 1.0.
13 | # (See accompanying file LICENSE.BOOST-1.0 or copy at
14 | # http://www.boost.org/LICENSE_1_0.txt)
15 |
16 | set(HEAD_HASH)
17 |
18 | file(READ "@HEAD_FILE@" HEAD_CONTENTS LIMIT 1024)
19 |
20 | string(STRIP "${HEAD_CONTENTS}" HEAD_CONTENTS)
21 | if(HEAD_CONTENTS MATCHES "ref")
22 | # named branch
23 | string(REPLACE "ref: " "" HEAD_REF "${HEAD_CONTENTS}")
24 | if(EXISTS "@GIT_DIR@/${HEAD_REF}")
25 | configure_file("@GIT_DIR@/${HEAD_REF}" "@GIT_DATA@/head-ref" COPYONLY)
26 | else()
27 | configure_file("@GIT_DIR@/packed-refs" "@GIT_DATA@/packed-refs" COPYONLY)
28 | file(READ "@GIT_DATA@/packed-refs" PACKED_REFS)
29 | if(${PACKED_REFS} MATCHES "([0-9a-z]*) ${HEAD_REF}")
30 | set(HEAD_HASH "${CMAKE_MATCH_1}")
31 | endif()
32 | endif()
33 | else()
34 | # detached HEAD
35 | configure_file("@GIT_DIR@/HEAD" "@GIT_DATA@/head-ref" COPYONLY)
36 | endif()
37 |
38 | if(NOT HEAD_HASH)
39 | file(READ "@GIT_DATA@/head-ref" HEAD_HASH LIMIT 1024)
40 | string(STRIP "${HEAD_HASH}" HEAD_HASH)
41 | endif()
42 |
--------------------------------------------------------------------------------
/src/gui/EditWidgetProperties.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_EDITWIDGETPROPERTIES_H
19 | #define KEEPASSX_EDITWIDGETPROPERTIES_H
20 |
21 | #include
22 |
23 | #include "core/TimeInfo.h"
24 | #include "core/Uuid.h"
25 |
26 | namespace Ui {
27 | class EditWidgetProperties;
28 | }
29 |
30 | class EditWidgetProperties : public QWidget
31 | {
32 | Q_OBJECT
33 |
34 | public:
35 | explicit EditWidgetProperties(QWidget* parent = nullptr);
36 | ~EditWidgetProperties();
37 |
38 | void setFields(TimeInfo timeInfo, Uuid uuid);
39 |
40 | private:
41 | const QScopedPointer m_ui;
42 |
43 | Q_DISABLE_COPY(EditWidgetProperties)
44 | };
45 |
46 | #endif // KEEPASSX_EDITWIDGETPROPERTIES_H
47 |
--------------------------------------------------------------------------------
/src/format/CsvExporter.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015 Florian Geyer
3 | * Copyright (C) 2015 Felix Geyer
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 2 or (at your option)
8 | * version 3 of the License.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | #ifndef KEEPASSX_CSVEXPORTER_H
20 | #define KEEPASSX_CSVEXPORTER_H
21 |
22 | #include
23 |
24 | class Database;
25 | class Group;
26 | class QIODevice;
27 |
28 | class CsvExporter
29 | {
30 | public:
31 | bool exportDatabase(const QString& filename, const Database* db);
32 | bool exportDatabase(QIODevice* device, const Database* db);
33 | QString errorString() const;
34 |
35 | private:
36 | bool writeGroup(QIODevice* device, const Group* group, QString groupPath = QString());
37 | void addColumn(QString& str, const QString& column);
38 |
39 | QString m_error;
40 | };
41 |
42 | #endif // KEEPASSX_CSVEXPORTER_H
43 |
--------------------------------------------------------------------------------
/src/gui/SortFilterHideProxyModel.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_SORTFILTERHIDEPROXYMODEL_H
19 | #define KEEPASSX_SORTFILTERHIDEPROXYMODEL_H
20 |
21 | #include
22 | #include
23 |
24 | class SortFilterHideProxyModel : public QSortFilterProxyModel
25 | {
26 | Q_OBJECT
27 |
28 | public:
29 | explicit SortFilterHideProxyModel(QObject* parent = nullptr);
30 | Qt::DropActions supportedDragActions() const override;
31 | void hideColumn(int column, bool hide);
32 |
33 | protected:
34 | bool filterAcceptsColumn(int sourceColumn, const QModelIndex& sourceParent) const override;
35 |
36 | private:
37 | QBitArray m_hiddenColumns;
38 | };
39 |
40 | #endif // KEEPASSX_SORTFILTERHIDEPROXYMODEL_H
41 |
--------------------------------------------------------------------------------
/src/gui/UnlockDatabaseWidget.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #include "UnlockDatabaseWidget.h"
19 |
20 | #include "ui_DatabaseOpenWidget.h"
21 | #include "core/Database.h"
22 | #include "gui/MessageBox.h"
23 |
24 | UnlockDatabaseWidget::UnlockDatabaseWidget(QWidget* parent)
25 | : DatabaseOpenWidget(parent)
26 | {
27 | m_ui->labelHeadline->setText(tr("Unlock database"));
28 | }
29 |
30 | void UnlockDatabaseWidget::clearForms()
31 | {
32 | m_ui->editPassword->clear();
33 | m_ui->comboKeyFile->clear();
34 | m_ui->checkPassword->setChecked(false);
35 | m_ui->checkKeyFile->setChecked(false);
36 | m_ui->checkChallengeResponse->setChecked(false);
37 | m_ui->buttonTogglePassword->setChecked(false);
38 | m_db = nullptr;
39 | }
40 |
--------------------------------------------------------------------------------
/src/core/EntrySearcher.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 Florian Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_ENTRYSEARCHER_H
19 | #define KEEPASSX_ENTRYSEARCHER_H
20 |
21 | #include
22 |
23 |
24 | class Group;
25 | class Entry;
26 |
27 | class EntrySearcher
28 | {
29 | public:
30 | QList search(const QString& searchTerm, const Group* group, Qt::CaseSensitivity caseSensitivity);
31 |
32 | private:
33 | QList searchEntries(const QString& searchTerm, const Group* group, Qt::CaseSensitivity caseSensitivity);
34 | QList matchEntry(const QString& searchTerm, Entry* entry, Qt::CaseSensitivity caseSensitivity);
35 | bool wordMatch(const QString& word, Entry* entry, Qt::CaseSensitivity caseSensitivity);
36 | };
37 |
38 | #endif // KEEPASSX_ENTRYSEARCHER_H
39 |
--------------------------------------------------------------------------------
/cmake/FindYubiKey.cmake:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2014 Kyle Manna
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 2 or (at your option)
6 | # version 3 of the License.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | find_path(YUBIKEY_CORE_INCLUDE_DIR yubikey.h)
17 | find_path(YUBIKEY_PERS_INCLUDE_DIR ykcore.h PATH_SUFFIXES ykpers-1)
18 | set(YUBIKEY_INCLUDE_DIRS ${YUBIKEY_CORE_INCLUDE_DIR} ${YUBIKEY_PERS_INCLUDE_DIR})
19 |
20 | find_library(YUBIKEY_CORE_LIBRARY yubikey)
21 | find_library(YUBIKEY_PERS_LIBRARY ykpers-1)
22 | set(YUBIKEY_LIBRARIES ${YUBIKEY_CORE_LIBRARY} ${YUBIKEY_PERS_LIBRARY})
23 |
24 | include(FindPackageHandleStandardArgs)
25 | find_package_handle_standard_args(YubiKey DEFAULT_MSG YUBIKEY_LIBRARIES YUBIKEY_INCLUDE_DIRS)
26 |
27 | # TODO: Is mark_as_advanced() necessary? It's used in many examples with
28 | # little explanation. Disable for now in favor of simplicity.
29 | #mark_as_advanced(YUBIKEY_LIBRARIES YUBIKEY_INCLUDE_DIRS)
30 |
--------------------------------------------------------------------------------
/src/format/KeePass2RandomStream.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_KEEPASS2RANDOMSTREAM_H
19 | #define KEEPASSX_KEEPASS2RANDOMSTREAM_H
20 |
21 | #include
22 |
23 | #include "crypto/SymmetricCipher.h"
24 |
25 | class KeePass2RandomStream
26 | {
27 | public:
28 | KeePass2RandomStream();
29 | bool init(const QByteArray& key);
30 | QByteArray randomBytes(int size, bool* ok);
31 | QByteArray process(const QByteArray& data, bool* ok);
32 | bool processInPlace(QByteArray& data) Q_REQUIRED_RESULT;
33 | QString errorString() const;
34 |
35 | private:
36 | bool loadBlock();
37 |
38 | SymmetricCipher m_cipher;
39 | QByteArray m_buffer;
40 | int m_offset;
41 | };
42 |
43 | #endif // KEEPASSX_KEEPASS2RANDOMSTREAM_H
44 |
--------------------------------------------------------------------------------
/src/gui/Clipboard.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_CLIPBOARD_H
19 | #define KEEPASSX_CLIPBOARD_H
20 |
21 | #include
22 |
23 | class QTimer;
24 |
25 | class Clipboard : public QObject
26 | {
27 | Q_OBJECT
28 |
29 | public:
30 | void setText(const QString& text);
31 |
32 | static Clipboard* instance();
33 |
34 | public Q_SLOTS:
35 | void clearCopiedText();
36 |
37 | private Q_SLOTS:
38 | void clearClipboard();
39 |
40 | private:
41 | explicit Clipboard(QObject* parent = nullptr);
42 |
43 | static Clipboard* m_instance;
44 |
45 | QTimer* m_timer;
46 | QString m_lastCopied;
47 | };
48 |
49 | inline Clipboard* clipboard() {
50 | return Clipboard::instance();
51 | }
52 |
53 | #endif // KEEPASSX_CLIPBOARD_H
54 |
--------------------------------------------------------------------------------
/tests/TestRandom.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2013 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_TESTRANDOM_H
19 | #define KEEPASSX_TESTRANDOM_H
20 |
21 | #include "crypto/Random.h"
22 |
23 | #include
24 |
25 | class RandomBackendTest : public RandomBackend
26 | {
27 | public:
28 | RandomBackendTest();
29 | void randomize(void* data, int len) override;
30 | void setNextBytes(const QByteArray& nextBytes);
31 |
32 | private:
33 | QByteArray m_nextBytes;
34 | int m_bytesIndex;
35 | };
36 |
37 | class TestRandom : public QObject
38 | {
39 | Q_OBJECT
40 |
41 | private Q_SLOTS:
42 | void initTestCase();
43 | void testUInt();
44 | void testUIntRange();
45 |
46 | private:
47 | RandomBackendTest* m_backend;
48 | };
49 |
50 | #endif // KEEPASSX_TESTRANDOM_H
51 |
--------------------------------------------------------------------------------
/src/core/ToDbExporter.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 Felix Geyer
3 | * Copyright (C) 2014 Florian Geyer
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 2 or (at your option)
8 | * version 3 of the License.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | #include "ToDbExporter.h"
20 | #include "core/Database.h"
21 | #include "core/Group.h"
22 | #include "core/Metadata.h"
23 |
24 | Database* ToDbExporter::exportGroup(Group* group)
25 | {
26 | Database* oldDb = group->database();
27 | Q_ASSERT(oldDb);
28 |
29 | Database* db = new Database();
30 | Group* clonedGroup = group->clone(Entry::CloneNewUuid | Entry::CloneIncludeHistory);
31 | clonedGroup->setParent(db->rootGroup());
32 |
33 | QSet customIcons = group->customIconsRecursive();
34 | db->metadata()->copyCustomIcons(customIcons, oldDb->metadata());
35 |
36 | db->copyAttributesFrom(oldDb);
37 |
38 | return db;
39 | }
40 |
--------------------------------------------------------------------------------
/tests/TestWildcardMatcher.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_TESTWILDCARDMATCHER_H
19 | #define KEEPASSX_TESTWILDCARDMATCHER_H
20 |
21 | #include
22 |
23 | class WildcardMatcher;
24 |
25 | class TestWildcardMatcher : public QObject
26 | {
27 | Q_OBJECT
28 |
29 | private Q_SLOTS:
30 | void testMatcher();
31 | void testMatcher_data();
32 |
33 | private:
34 | static const QString DefaultText;
35 | static const QString AlternativeText;
36 |
37 | void initMatcher(QString text);
38 | void verifyMatchResult(QString pattern, bool expected);
39 | void verifyMatch(QString pattern);
40 | void verifyNoMatch(QString pattern);
41 |
42 | WildcardMatcher* m_matcher;
43 | };
44 |
45 | #endif // KEEPASSX_TESTWILDCARDMATCHER_H
46 |
--------------------------------------------------------------------------------
/src/gui/DragTabBar.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_DRAGTABBAR_H
19 | #define KEEPASSX_DRAGTABBAR_H
20 |
21 | #include
22 |
23 | class DragTabBar : public QTabBar
24 | {
25 | Q_OBJECT
26 |
27 | public:
28 | explicit DragTabBar(QWidget* parent = nullptr);
29 |
30 | protected:
31 | void dragEnterEvent(QDragEnterEvent* event) override;
32 | void dragMoveEvent(QDragMoveEvent* event) override;
33 | void dragLeaveEvent(QDragLeaveEvent* event) override;
34 | void dropEvent(QDropEvent* event) override;
35 | void tabLayoutChange() override;
36 |
37 | private Q_SLOTS:
38 | void dragSwitchTab();
39 |
40 | private:
41 | QTimer* const m_tabSwitchTimer;
42 | int m_tabSwitchIndex;
43 | };
44 |
45 | #endif // KEEPASSX_DRAGTABBAR_H
46 |
--------------------------------------------------------------------------------
/src/gui/PasswordComboBox.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2013 Michael Curtis
3 | * Copyright (C) 2014 Felix Geyer
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 2 or (at your option)
8 | * version 3 of the License.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | #ifndef KEEPASSX_PASSWORDCOMBOBOX_H
20 | #define KEEPASSX_PASSWORDCOMBOBOX_H
21 |
22 | #include
23 |
24 | class PasswordGenerator;
25 |
26 | class PasswordComboBox : public QComboBox
27 | {
28 | Q_OBJECT
29 |
30 | public:
31 | explicit PasswordComboBox(QWidget* parent = nullptr);
32 | ~PasswordComboBox();
33 |
34 | void setGenerator(PasswordGenerator* generator);
35 | void setNumberAlternatives(int alternatives);
36 | void showPopup();
37 |
38 | public Q_SLOTS:
39 | void setEcho(bool echo);
40 |
41 | private:
42 | PasswordGenerator* m_generator;
43 | int m_alternatives;
44 | };
45 |
46 | #endif // KEEPASSX_PASSWORDCOMBOBOX_H
47 |
--------------------------------------------------------------------------------
/src/gui/PasswordEdit.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_PASSWORDEDIT_H
19 | #define KEEPASSX_PASSWORDEDIT_H
20 |
21 | #include
22 |
23 | class PasswordEdit : public QLineEdit
24 | {
25 | Q_OBJECT
26 |
27 | public:
28 | static const QColor CorrectSoFarColor;
29 | static const QColor ErrorColor;
30 |
31 | explicit PasswordEdit(QWidget* parent = nullptr);
32 | void enableVerifyMode(PasswordEdit* baseEdit);
33 |
34 | public Q_SLOTS:
35 | void setShowPassword(bool show);
36 |
37 | Q_SIGNALS:
38 | void showPasswordChanged(bool show);
39 |
40 | private Q_SLOTS:
41 | void updateStylesheet();
42 |
43 | private:
44 | bool passwordsEqual() const;
45 |
46 | PasswordEdit* m_basePasswordEdit;
47 | };
48 |
49 | #endif // KEEPASSX_PASSWORDEDIT_H
50 |
--------------------------------------------------------------------------------
/src/core/InactivityTimer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_INACTIVITYTIMER_H
19 | #define KEEPASSX_INACTIVITYTIMER_H
20 |
21 | #include
22 | #include
23 |
24 | class QTimer;
25 |
26 | class InactivityTimer : public QObject
27 | {
28 | Q_OBJECT
29 |
30 | public:
31 | explicit InactivityTimer(QObject* parent = nullptr);
32 | void setInactivityTimeout(int inactivityTimeout);
33 | void activate();
34 | void deactivate();
35 |
36 | Q_SIGNALS:
37 | void inactivityDetected();
38 |
39 | protected:
40 | bool eventFilter(QObject* watched, QEvent* event);
41 |
42 | private Q_SLOTS:
43 | void timeout();
44 |
45 | private:
46 | QTimer* m_timer;
47 | bool m_active;
48 | QMutex m_emitMutx;
49 | };
50 |
51 | #endif // KEEPASSX_INACTIVITYTIMER_H
52 |
--------------------------------------------------------------------------------
/src/core/TimeDelta.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_TIMEDELTA_H
19 | #define KEEPASSX_TIMEDELTA_H
20 |
21 | #include
22 |
23 | class QDateTime;
24 | class TimeDelta;
25 |
26 | QDateTime operator+(const QDateTime& dateTime, const TimeDelta& delta);
27 |
28 | class TimeDelta
29 | {
30 | public:
31 | static TimeDelta fromDays(int days);
32 | static TimeDelta fromMonths(int months);
33 | static TimeDelta fromYears(int years);
34 |
35 | TimeDelta();
36 | TimeDelta(int days, int months, int years);
37 |
38 | int getDays() const;
39 | int getMonths() const;
40 | int getYears() const;
41 |
42 | private:
43 | int m_days;
44 | int m_months;
45 | int m_years;
46 | };
47 |
48 | Q_DECLARE_METATYPE(TimeDelta)
49 |
50 | #endif // KEEPASSX_TIMEDELTA_H
51 |
--------------------------------------------------------------------------------
/src/format/KeePass2Repair.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_KEEPASS2REPAIR_H
19 | #define KEEPASSX_KEEPASS2REPAIR_H
20 |
21 | #include
22 | #include
23 |
24 | #include "core/Database.h"
25 | #include "keys/CompositeKey.h"
26 |
27 | class KeePass2Repair
28 | {
29 | Q_DECLARE_TR_FUNCTIONS(KeePass2Repair)
30 |
31 | public:
32 | enum RepairResult
33 | {
34 | NothingTodo,
35 | UnableToOpen,
36 | RepairSuccess,
37 | RepairFailed
38 | };
39 |
40 | KeePass2Repair();
41 | RepairResult repairDatabase(QIODevice* device, const CompositeKey& key);
42 | Database* database() const;
43 | QString errorString() const;
44 |
45 | private:
46 | Database* m_db;
47 | QString m_errorStr;
48 | };
49 |
50 | #endif // KEEPASSX_KEEPASS2REPAIR_H
51 |
--------------------------------------------------------------------------------
/src/gui/SortFilterHideProxyModel.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #include "SortFilterHideProxyModel.h"
19 |
20 | SortFilterHideProxyModel::SortFilterHideProxyModel(QObject* parent)
21 | : QSortFilterProxyModel(parent)
22 | {
23 | }
24 |
25 | Qt::DropActions SortFilterHideProxyModel::supportedDragActions() const
26 | {
27 | return sourceModel()->supportedDragActions();
28 | }
29 |
30 | void SortFilterHideProxyModel::hideColumn(int column, bool hide)
31 | {
32 | m_hiddenColumns.resize(column + 1);
33 | m_hiddenColumns[column] = hide;
34 |
35 | invalidateFilter();
36 | }
37 |
38 | bool SortFilterHideProxyModel::filterAcceptsColumn(int sourceColumn, const QModelIndex& sourceParent) const
39 | {
40 | Q_UNUSED(sourceParent);
41 |
42 | return sourceColumn >= m_hiddenColumns.size() || !m_hiddenColumns.at(sourceColumn);
43 | }
44 |
--------------------------------------------------------------------------------
/share/translations/keepassx_en_plurals.ts:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | DatabaseWidget
6 |
7 | Do you really want to move %n entry(s) to the recycle bin?
8 |
9 | Do you really want to move %n entry to the recycle bin?
10 | Do you really want to move %n entries to the recycle bin?
11 |
12 |
13 |
14 |
15 | EditEntryWidget
16 |
17 | %n week(s)
18 |
19 | %n week
20 | %n weeks
21 |
22 |
23 |
24 | %n month(s)
25 |
26 | %n month
27 | %n months
28 |
29 |
30 |
31 |
32 | EditWidgetIcons
33 |
34 | Can't delete icon. Still used by %n item(s).
35 |
36 | Can't delete icon. Still used by %n item.
37 | Can't delete icon. Still used by %n items.
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/src/crypto/Crypto.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_CRYPTO_H
19 | #define KEEPASSX_CRYPTO_H
20 |
21 | #include
22 |
23 | class Crypto
24 | {
25 | public:
26 | static bool init();
27 | static bool initalized();
28 | static bool backendSelfTest();
29 | static QString errorString();
30 | static QString backendVersion();
31 |
32 | private:
33 | Crypto();
34 | static bool checkAlgorithms();
35 | static bool selfTest();
36 | static void raiseError(const QString& str);
37 | static bool testSha256();
38 | static bool testAes256Cbc();
39 | static bool testAes256Ecb();
40 | static bool testTwofish();
41 | static bool testSalsa20();
42 |
43 | static bool m_initalized;
44 | static QString m_errorStr;
45 | static QString m_backendVersion;
46 | };
47 |
48 | #endif // KEEPASSX_CRYPTO_H
49 |
--------------------------------------------------------------------------------
/src/crypto/SymmetricCipherBackend.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_SYMMETRICCIPHERBACKEND_H
19 | #define KEEPASSX_SYMMETRICCIPHERBACKEND_H
20 |
21 | #include
22 |
23 | class SymmetricCipherBackend
24 | {
25 | public:
26 | virtual ~SymmetricCipherBackend() {}
27 | virtual bool init() = 0;
28 | virtual bool setKey(const QByteArray& key) = 0;
29 | virtual bool setIv(const QByteArray& iv) = 0;
30 |
31 | virtual QByteArray process(const QByteArray& data, bool* ok) = 0;
32 | virtual bool processInPlace(QByteArray& data) Q_REQUIRED_RESULT = 0;
33 | virtual bool processInPlace(QByteArray& data, quint64 rounds) Q_REQUIRED_RESULT = 0;
34 |
35 | virtual bool reset() = 0;
36 | virtual int blockSize() const = 0;
37 |
38 | virtual QString errorString() const = 0;
39 | };
40 |
41 | #endif // KEEPASSX_SYMMETRICCIPHERBACKEND_H
42 |
--------------------------------------------------------------------------------
/src/format/KeePass2Writer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_KEEPASS2WRITER_H
19 | #define KEEPASSX_KEEPASS2WRITER_H
20 |
21 | #include "format/KeePass2.h"
22 | #include "keys/CompositeKey.h"
23 |
24 | class Database;
25 | class QIODevice;
26 |
27 | class KeePass2Writer
28 | {
29 | public:
30 | KeePass2Writer();
31 | void writeDatabase(QIODevice* device, Database* db);
32 | void writeDatabase(const QString& filename, Database* db);
33 | bool hasError();
34 | QString errorString();
35 |
36 | private:
37 | bool writeData(const QByteArray& data);
38 | bool writeHeaderField(KeePass2::HeaderFieldID fieldId, const QByteArray& data);
39 | void raiseError(const QString& errorMessage);
40 |
41 | QIODevice* m_device;
42 | bool m_error;
43 | QString m_errorStr;
44 | };
45 |
46 | #endif // KEEPASSX_KEEPASS2WRITER_H
47 |
--------------------------------------------------------------------------------
/src/keys/YkChallengeResponseKey.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_YK_CHALLENGERESPONSEKEY_H
19 | #define KEEPASSX_YK_CHALLENGERESPONSEKEY_H
20 |
21 | #include "core/Global.h"
22 | #include "keys/ChallengeResponseKey.h"
23 | #include "keys/drivers/YubiKey.h"
24 |
25 | class YkChallengeResponseKey : public ChallengeResponseKey
26 | {
27 | public:
28 |
29 | YkChallengeResponseKey(int slot = -1,
30 | bool blocking = false);
31 |
32 | QByteArray rawKey() const;
33 | YkChallengeResponseKey* clone() const;
34 | bool challenge(const QByteArray& chal);
35 | bool challenge(const QByteArray& chal, int retries);
36 | QString getName() const;
37 | bool isBlocking() const;
38 |
39 | private:
40 | QByteArray m_key;
41 | int m_slot;
42 | bool m_blocking;
43 | };
44 |
45 | #endif // KEEPASSX_YK_CHALLENGERESPONSEKEY_H
46 |
--------------------------------------------------------------------------------
/src/streams/StoreDataStream.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #include "StoreDataStream.h"
19 |
20 | StoreDataStream::StoreDataStream(QIODevice* baseDevice)
21 | : LayeredStream(baseDevice)
22 | {
23 | }
24 |
25 | bool StoreDataStream::open(QIODevice::OpenMode mode)
26 | {
27 | bool result = LayeredStream::open(mode);
28 |
29 | if (result) {
30 | m_storedData.clear();
31 | }
32 |
33 | return result;
34 | }
35 |
36 | QByteArray StoreDataStream::storedData() const
37 | {
38 | return m_storedData;
39 | }
40 |
41 | qint64 StoreDataStream::readData(char* data, qint64 maxSize)
42 | {
43 | qint64 bytesRead = LayeredStream::readData(data, maxSize);
44 | if (bytesRead == -1) {
45 | setErrorString(m_baseDevice->errorString());
46 | return -1;
47 | }
48 |
49 | m_storedData.append(data, bytesRead);
50 |
51 | return bytesRead;
52 | }
53 |
--------------------------------------------------------------------------------
/src/autotype/ShortcutWidget.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_SHORTCUTWIDGET_H
19 | #define KEEPASSX_SHORTCUTWIDGET_H
20 |
21 | #include
22 |
23 | class ShortcutWidget : public QLineEdit
24 | {
25 | Q_OBJECT
26 |
27 | public:
28 | explicit ShortcutWidget(QWidget* parent = nullptr);
29 | Qt::Key key() const;
30 | Qt::KeyboardModifiers modifiers() const;
31 | void setShortcut(Qt::Key key, Qt::KeyboardModifiers modifiers);
32 |
33 | protected:
34 | void keyPressEvent(QKeyEvent* event) override;
35 | void keyReleaseEvent(QKeyEvent* event) override;
36 |
37 | private:
38 | void keyEvent(QKeyEvent* event);
39 | void displayShortcut(Qt::Key key, Qt::KeyboardModifiers modifiers);
40 | void resetShortcut();
41 |
42 | Qt::Key m_key;
43 | Qt::KeyboardModifiers m_modifiers;
44 | bool m_locked;
45 | };
46 |
47 | #endif // KEEPASSX_SHORTCUTWIDGET_H
48 |
--------------------------------------------------------------------------------
/src/core/DatabaseIcons.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_DATABASEICONS_H
19 | #define KEEPASSX_DATABASEICONS_H
20 |
21 | #include
22 | #include
23 | #include
24 | #include
25 |
26 | class DatabaseIcons
27 | {
28 | public:
29 | QImage icon(int index);
30 | QPixmap iconPixmap(int index);
31 |
32 | static DatabaseIcons* instance();
33 |
34 | static const int IconCount;
35 | static const int ExpiredIconIndex;
36 |
37 | private:
38 | DatabaseIcons();
39 |
40 | static DatabaseIcons* m_instance;
41 |
42 | static const char* const m_indexToName[];
43 | QVector m_iconCache;
44 | QVector m_pixmapCacheKeys;
45 |
46 | Q_DISABLE_COPY(DatabaseIcons)
47 | };
48 |
49 | inline DatabaseIcons* databaseIcons() {
50 | return DatabaseIcons::instance();
51 | }
52 |
53 | #endif // KEEPASSX_DATABASEICONS_H
54 |
--------------------------------------------------------------------------------
/tests/TestYkChallengeResponseKey.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 Kyle Manna
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_TESTYUBIKEYCHALRESP_H
19 | #define KEEPASSX_TESTYUBIKEYCHALRESP_H
20 |
21 | #include
22 |
23 | #include "keys/YkChallengeResponseKey.h"
24 |
25 | class TestYubiKeyChalResp: public QObject
26 | {
27 | Q_OBJECT
28 |
29 | private Q_SLOTS:
30 | void initTestCase();
31 | void cleanupTestCase();
32 |
33 | void init();
34 |
35 | /* Order is important!
36 | * Need to init and detectDevices() before proceeding
37 | */
38 | void detectDevices();
39 |
40 | void getSerial();
41 | void keyGetName();
42 | void keyIssueChallenge();
43 |
44 | void deinit();
45 |
46 | /* Callback for detectDevices() */
47 | void ykDetected(int slot, bool blocking);
48 |
49 | private:
50 | int m_detected;
51 | YkChallengeResponseKey *m_key;
52 | };
53 |
54 | #endif // KEEPASSX_TESTYUBIKEYCHALRESP_H
55 |
--------------------------------------------------------------------------------
/src/core/FilePath.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_FILEPATH_H
19 | #define KEEPASSX_FILEPATH_H
20 |
21 | #include
22 | #include
23 | #include
24 |
25 | class FilePath
26 | {
27 | public:
28 | QString dataPath(const QString& name);
29 | QString pluginPath(const QString& name);
30 | QIcon applicationIcon();
31 | QIcon icon(const QString& category, const QString& name, bool fromTheme = true);
32 | QIcon onOffIcon(const QString& category, const QString& name);
33 |
34 | static FilePath* instance();
35 |
36 | private:
37 | FilePath();
38 | bool testSetDir(const QString& dir);
39 |
40 | static FilePath* m_instance;
41 |
42 | QString m_dataPath;
43 | QHash m_iconCache;
44 |
45 | Q_DISABLE_COPY(FilePath)
46 | };
47 |
48 | inline FilePath* filePath() {
49 | return FilePath::instance();
50 | }
51 |
52 | #endif // KEEPASSX_FILEPATH_H
53 |
--------------------------------------------------------------------------------
/src/autotype/WildcardMatcher.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_WILDCARDMATCHER_H
19 | #define KEEPASSX_WILDCARDMATCHER_H
20 |
21 | #include
22 |
23 | class WildcardMatcher
24 | {
25 | public:
26 | explicit WildcardMatcher(const QString& text);
27 | bool match(const QString& pattern);
28 |
29 | static const QChar Wildcard;
30 |
31 | private:
32 | bool patternEqualsText();
33 | bool patternContainsWildcard();
34 | bool matchWithWildcards();
35 | bool startOrEndDoesNotMatch(const QStringList& parts);
36 | bool partsMatch(const QStringList& parts);
37 | int getMatchIndex(const QString& part, int startIndex);
38 | bool noMatchFound(int index);
39 | int calculateNewIndex(int matchIndex, int partLength);
40 |
41 | static const Qt::CaseSensitivity Sensitivity;
42 | const QString m_text;
43 | QString m_pattern;
44 | };
45 |
46 | #endif // KEEPASSX_WILDCARDMATCHER_H
47 |
--------------------------------------------------------------------------------
/src/gui/EditWidgetProperties.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #include "EditWidgetProperties.h"
19 | #include "ui_EditWidgetProperties.h"
20 |
21 | EditWidgetProperties::EditWidgetProperties(QWidget* parent)
22 | : QWidget(parent)
23 | , m_ui(new Ui::EditWidgetProperties())
24 | {
25 | m_ui->setupUi(this);
26 | }
27 |
28 | EditWidgetProperties::~EditWidgetProperties()
29 | {
30 | }
31 |
32 | void EditWidgetProperties::setFields(TimeInfo timeInfo, Uuid uuid)
33 | {
34 | QString timeFormat("d MMM yyyy HH:mm:ss");
35 | m_ui->modifiedEdit->setText(
36 | timeInfo.lastModificationTime().toLocalTime().toString(timeFormat));
37 | m_ui->createdEdit->setText(
38 | timeInfo.creationTime().toLocalTime().toString(timeFormat));
39 | m_ui->accessedEdit->setText(
40 | timeInfo.lastAccessTime().toLocalTime().toString(timeFormat));
41 | m_ui->uuidEdit->setText(uuid.toHex());
42 | }
43 |
--------------------------------------------------------------------------------
/tests/data/EmptyUuids.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | KeePass
5 | ANAME
6 | 2010-08-08T17:24:53Z
7 | ADESC
8 | 2010-08-08T17:27:12Z
9 | DEFUSERNAME
10 | 2010-08-08T17:27:45Z
11 | 127
12 | #FFEF00
13 | 2012-04-05T17:09:34Z
14 | 101
15 | -1
16 |
17 |
18 | True
19 |
20 | 2010-08-25T16:12:57Z
21 |
22 | 2010-08-08T17:24:19Z
23 |
24 |
25 | -1
26 | 5242880
27 |
28 |
29 |
30 |
31 |
32 | lmU+9n0aeESKZvcEze+bRg==
33 | NewDatabase
34 |
35 | 49
36 |
37 | True
38 |
39 | null
40 | null
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/src/autotype/AutoTypeSelectDialog.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_AUTOTYPESELECTDIALOG_H
19 | #define KEEPASSX_AUTOTYPESELECTDIALOG_H
20 |
21 | #include
22 | #include
23 | #include
24 |
25 | class AutoTypeSelectView;
26 | class Entry;
27 |
28 | class AutoTypeSelectDialog : public QDialog
29 | {
30 | Q_OBJECT
31 |
32 | public:
33 | explicit AutoTypeSelectDialog(QWidget* parent = nullptr);
34 | void setEntries(const QList& entries, const QHash& sequences);
35 |
36 | Q_SIGNALS:
37 | void entryActivated(Entry* entry, const QString& sequence);
38 |
39 | private Q_SLOTS:
40 | void emitEntryActivated(const QModelIndex& index);
41 | void entryRemoved();
42 |
43 | private:
44 | AutoTypeSelectView* const m_view;
45 | QHash m_sequences;
46 | bool m_entryActivatedEmitted;
47 | };
48 |
49 | #endif // KEEPASSX_AUTOTYPESELECTDIALOG_H
50 |
--------------------------------------------------------------------------------
/cmake/FindGcrypt.cmake:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2011 Felix Geyer
2 | #
3 | # This program is free software: you can redistribute it and/or modify
4 | # it under the terms of the GNU General Public License as published by
5 | # the Free Software Foundation, either version 2 or (at your option)
6 | # version 3 of the License.
7 | #
8 | # This program is distributed in the hope that it will be useful,
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 | # GNU General Public License for more details.
12 | #
13 | # You should have received a copy of the GNU General Public License
14 | # along with this program. If not, see .
15 |
16 | find_path(GCRYPT_INCLUDE_DIR gcrypt.h)
17 |
18 | find_library(GCRYPT_LIBRARIES gcrypt)
19 |
20 | mark_as_advanced(GCRYPT_LIBRARIES GCRYPT_INCLUDE_DIR)
21 |
22 | if(GCRYPT_INCLUDE_DIR AND EXISTS "${GCRYPT_INCLUDE_DIR}/gcrypt.h")
23 | file(STRINGS "${GCRYPT_INCLUDE_DIR}/gcrypt.h" GCRYPT_H REGEX "^#define GCRYPT_VERSION \"[^\"]*\"$")
24 | string(REGEX REPLACE "^.*GCRYPT_VERSION \"([0-9]+).*$" "\\1" GCRYPT_VERSION_MAJOR "${GCRYPT_H}")
25 | string(REGEX REPLACE "^.*GCRYPT_VERSION \"[0-9]+\\.([0-9]+).*$" "\\1" GCRYPT_VERSION_MINOR "${GCRYPT_H}")
26 | string(REGEX REPLACE "^.*GCRYPT_VERSION \"[0-9]+\\.[0-9]+\\.([0-9]+).*$" "\\1" GCRYPT_VERSION_PATCH "${GCRYPT_H}")
27 | set(GCRYPT_VERSION_STRING "${GCRYPT_VERSION_MAJOR}.${GCRYPT_VERSION_MINOR}.${GCRYPT_VERSION_PATCH}")
28 | endif()
29 |
30 | include(FindPackageHandleStandardArgs)
31 | find_package_handle_standard_args(Gcrypt DEFAULT_MSG GCRYPT_LIBRARIES GCRYPT_INCLUDE_DIR)
32 |
--------------------------------------------------------------------------------
/src/keys/FileKey.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_FILEKEY_H
19 | #define KEEPASSX_FILEKEY_H
20 |
21 | #include
22 |
23 | #include "keys/Key.h"
24 |
25 | class QIODevice;
26 |
27 | class FileKey : public Key
28 | {
29 | public:
30 | FileKey();
31 | bool load(QIODevice* device);
32 | bool load(const QString& fileName, QString* errorMsg = nullptr);
33 | QByteArray rawKey() const;
34 | FileKey* clone() const;
35 | static void create(QIODevice* device);
36 | static bool create(const QString& fileName, QString* errorMsg = nullptr);
37 |
38 | private:
39 | bool loadXml(QIODevice* device);
40 | bool loadXmlMeta(QXmlStreamReader& xmlReader);
41 | QByteArray loadXmlKey(QXmlStreamReader& xmlReader);
42 | bool loadBinary(QIODevice* device);
43 | bool loadHex(QIODevice* device);
44 | bool loadHashed(QIODevice* device);
45 |
46 | QByteArray m_key;
47 | };
48 |
49 | #endif // KEEPASSX_FILEKEY_H
50 |
--------------------------------------------------------------------------------
/src/core/Uuid.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_UUID_H
19 | #define KEEPASSX_UUID_H
20 |
21 | #include
22 | #include
23 |
24 | class Uuid
25 | {
26 | public:
27 | Uuid();
28 | explicit Uuid(const QByteArray& data);
29 | static Uuid random();
30 | QString toBase64() const;
31 | QString toHex() const;
32 | QByteArray toByteArray() const;
33 |
34 | bool isNull() const;
35 | Uuid& operator=(const Uuid& other);
36 | bool operator==(const Uuid& other) const;
37 | bool operator!=(const Uuid& other) const;
38 | static const int Length;
39 | static Uuid fromBase64(const QString& str);
40 |
41 | private:
42 | QByteArray m_data;
43 | };
44 |
45 | Q_DECLARE_TYPEINFO(Uuid, Q_MOVABLE_TYPE);
46 |
47 | uint qHash(const Uuid& key);
48 |
49 | QDataStream& operator<<(QDataStream& stream, const Uuid& uuid);
50 | QDataStream& operator>>(QDataStream& stream, Uuid& uuid);
51 |
52 | #endif // KEEPASSX_UUID_H
53 |
--------------------------------------------------------------------------------
/tests/TestKeePass1Reader.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_TESTKEEPASS1READER_H
19 | #define KEEPASSX_TESTKEEPASS1READER_H
20 |
21 | #include
22 | #include
23 |
24 | class Database;
25 |
26 | class TestKeePass1Reader : public QObject
27 | {
28 | Q_OBJECT
29 |
30 | private Q_SLOTS:
31 | void initTestCase();
32 | void testBasic();
33 | void testMasterKey();
34 | void testCustomIcons();
35 | void testGroupExpanded();
36 | void testAutoType();
37 | void testFileKey();
38 | void testFileKey_data();
39 | void testCompositeKey();
40 | void testTwofish();
41 | void testCP1252Password();
42 | void cleanupTestCase();
43 |
44 | private:
45 | static QDateTime genDT(int year, int month, int day, int hour, int min);
46 | static void reopenDatabase(Database* db, const QString& password, const QString& keyfileName);
47 |
48 | Database* m_db;
49 | };
50 |
51 | #endif // KEEPASSX_TESTKEEPASS1READER_H
52 |
--------------------------------------------------------------------------------
/src/gui/DatabaseSettingsWidget.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_DATABASESETTINGSWIDGET_H
19 | #define KEEPASSX_DATABASESETTINGSWIDGET_H
20 |
21 | #include
22 |
23 | #include "gui/DialogyWidget.h"
24 |
25 | class Database;
26 |
27 | namespace Ui {
28 | class DatabaseSettingsWidget;
29 | }
30 |
31 | class DatabaseSettingsWidget : public DialogyWidget
32 | {
33 | Q_OBJECT
34 |
35 | public:
36 | explicit DatabaseSettingsWidget(QWidget* parent = nullptr);
37 | ~DatabaseSettingsWidget();
38 |
39 | void load(Database* db);
40 |
41 | Q_SIGNALS:
42 | void editFinished(bool accepted);
43 |
44 | private Q_SLOTS:
45 | void save();
46 | void reject();
47 | void transformRoundsBenchmark();
48 |
49 | private:
50 | void truncateHistories();
51 |
52 | const QScopedPointer m_ui;
53 | Database* m_db;
54 |
55 | Q_DISABLE_COPY(DatabaseSettingsWidget)
56 | };
57 |
58 | #endif // KEEPASSX_DATABASESETTINGSWIDGET_H
59 |
--------------------------------------------------------------------------------
/src/gui/EditWidget.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_EDITWIDGET_H
19 | #define KEEPASSX_EDITWIDGET_H
20 |
21 | #include
22 |
23 | #include "gui/DialogyWidget.h"
24 |
25 | class QLabel;
26 |
27 | namespace Ui {
28 | class EditWidget;
29 | }
30 |
31 | class EditWidget : public DialogyWidget
32 | {
33 | Q_OBJECT
34 |
35 | public:
36 | explicit EditWidget(QWidget* parent = nullptr);
37 | ~EditWidget();
38 |
39 | void add(const QString& labelText, QWidget* widget);
40 | void setRowHidden(QWidget* widget, bool hide);
41 | void setCurrentRow(int index);
42 | void setHeadline(const QString& text);
43 | QLabel* headlineLabel();
44 | void setReadOnly(bool readOnly);
45 | bool readOnly() const;
46 |
47 | Q_SIGNALS:
48 | void accepted();
49 | void rejected();
50 |
51 | private:
52 | const QScopedPointer m_ui;
53 | bool m_readOnly;
54 |
55 | Q_DISABLE_COPY(EditWidget)
56 | };
57 |
58 | #endif // KEEPASSX_EDITWIDGET_H
59 |
--------------------------------------------------------------------------------
/src/streams/HashedBlockStream.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_HASHEDBLOCKSTREAM_H
19 | #define KEEPASSX_HASHEDBLOCKSTREAM_H
20 |
21 | #include
22 |
23 | #include "streams/LayeredStream.h"
24 |
25 | class HashedBlockStream : public LayeredStream
26 | {
27 | Q_OBJECT
28 |
29 | public:
30 | explicit HashedBlockStream(QIODevice* baseDevice);
31 | HashedBlockStream(QIODevice* baseDevice, qint32 blockSize);
32 | ~HashedBlockStream();
33 |
34 | bool reset() override;
35 | void close() override;
36 |
37 | protected:
38 | qint64 readData(char* data, qint64 maxSize) override;
39 | qint64 writeData(const char* data, qint64 maxSize) override;
40 |
41 | private:
42 | void init();
43 | bool readHashedBlock();
44 | bool writeHashedBlock();
45 |
46 | static const QSysInfo::Endian ByteOrder;
47 | qint32 m_blockSize;
48 | QByteArray m_buffer;
49 | int m_bufferPos;
50 | quint32 m_blockIndex;
51 | bool m_eof;
52 | bool m_error;
53 | };
54 |
55 | #endif // KEEPASSX_HASHEDBLOCKSTREAM_H
56 |
--------------------------------------------------------------------------------
/src/gui/SettingsWidget.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_SETTINGSWIDGET_H
19 | #define KEEPASSX_SETTINGSWIDGET_H
20 |
21 | #include "gui/EditWidget.h"
22 |
23 | namespace Ui {
24 | class SettingsWidgetGeneral;
25 | class SettingsWidgetSecurity;
26 | }
27 |
28 | class SettingsWidget : public EditWidget
29 | {
30 | Q_OBJECT
31 |
32 | public:
33 | explicit SettingsWidget(QWidget* parent = nullptr);
34 | ~SettingsWidget();
35 | void loadSettings();
36 |
37 | Q_SIGNALS:
38 | void editFinished(bool accepted);
39 |
40 | private Q_SLOTS:
41 | void saveSettings();
42 | void reject();
43 | void enableAutoSaveOnExit(bool checked);
44 |
45 | private:
46 | QWidget* const m_secWidget;
47 | QWidget* const m_generalWidget;
48 | const QScopedPointer m_secUi;
49 | const QScopedPointer m_generalUi;
50 | Qt::Key m_globalAutoTypeKey;
51 | Qt::KeyboardModifiers m_globalAutoTypeModifiers;
52 | };
53 |
54 | #endif // KEEPASSX_SETTINGSWIDGET_H
55 |
--------------------------------------------------------------------------------
/src/autotype/AutoTypeSelectView.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #include "AutoTypeSelectView.h"
19 |
20 | #include
21 |
22 | AutoTypeSelectView::AutoTypeSelectView(QWidget* parent)
23 | : EntryView(parent)
24 | {
25 | hideColumn(3);
26 | setMouseTracking(true);
27 | setAllColumnsShowFocus(true);
28 | setDragEnabled(false);
29 | setSelectionMode(QAbstractItemView::SingleSelection);
30 |
31 | connect(model(), SIGNAL(modelReset()), SLOT(selectFirstEntry()));
32 | }
33 |
34 | void AutoTypeSelectView::mouseMoveEvent(QMouseEvent* event)
35 | {
36 | QModelIndex index = indexAt(event->pos());
37 |
38 | if (index.isValid()) {
39 | setCurrentIndex(index);
40 | setCursor(Qt::PointingHandCursor);
41 | }
42 | else {
43 | unsetCursor();
44 | }
45 |
46 | EntryView::mouseMoveEvent(event);
47 | }
48 |
49 | void AutoTypeSelectView::selectFirstEntry()
50 | {
51 | QModelIndex index = model()->index(0, 0);
52 |
53 | if (index.isValid()) {
54 | setCurrentIndex(index);
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/core/Config.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2011 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_CONFIG_H
19 | #define KEEPASSX_CONFIG_H
20 |
21 | #include
22 | #include
23 |
24 | class QSettings;
25 |
26 | class Config : public QObject
27 | {
28 | Q_OBJECT
29 |
30 | public:
31 | ~Config();
32 | QVariant get(const QString& key);
33 | QVariant get(const QString& key, const QVariant& defaultValue);
34 | void set(const QString& key, const QVariant& value);
35 |
36 | static Config* instance();
37 | static void createConfigFromFile(const QString& file);
38 | static void createTempFileInstance();
39 |
40 | private:
41 | Config(const QString& fileName, QObject* parent);
42 | explicit Config(QObject* parent);
43 | void init(const QString& fileName);
44 |
45 | static Config* m_instance;
46 |
47 | QScopedPointer m_settings;
48 | QHash m_defaults;
49 |
50 | Q_DISABLE_COPY(Config)
51 | };
52 |
53 | inline Config* config() {
54 | return Config::instance();
55 | }
56 |
57 | #endif // KEEPASSX_CONFIG_H
58 |
--------------------------------------------------------------------------------
/tests/TestKeePass2XmlReader.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_TESTKEEPASS2XMLREADER_H
19 | #define KEEPASSX_TESTKEEPASS2XMLREADER_H
20 |
21 | #include
22 | #include
23 |
24 | class Database;
25 |
26 | class TestKeePass2XmlReader : public QObject
27 | {
28 | Q_OBJECT
29 |
30 | private Q_SLOTS:
31 | void initTestCase();
32 | void testMetadata();
33 | void testCustomIcons();
34 | void testCustomData();
35 | void testGroupRoot();
36 | void testGroup1();
37 | void testGroup2();
38 | void testEntry1();
39 | void testEntry2();
40 | void testEntryHistory();
41 | void testDeletedObjects();
42 | void testBroken();
43 | void testBroken_data();
44 | void testEmptyUuids();
45 | void testInvalidXmlChars();
46 | void cleanupTestCase();
47 |
48 | private:
49 | static QDateTime genDT(int year, int month, int day, int hour, int min, int second);
50 | static QByteArray strToBytes(const QString& str);
51 |
52 | Database* m_db;
53 | };
54 |
55 | #endif // KEEPASSX_TESTKEEPASS2XMLREADER_H
56 |
--------------------------------------------------------------------------------
/share/macosx/Info.plist.cmake:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | NSPrincipalClass
6 | NSApplication
7 | CFBundleDevelopmentRegion
8 | English
9 | CFBundleDisplayName
10 | ${PROJECT_NAME}
11 | CFBundleExecutable
12 | ${PROGNAME}
13 | CFBundleIconFile
14 | keepassx.icns
15 | CFBundleIdentifier
16 | org.keepassx.keepassx
17 | CFBundleInfoDictionaryVersion
18 | 6.0
19 | CFBundleName
20 | ${PROJECT_NAME}
21 | CFBundlePackageType
22 | APPL
23 | CFBundleShortVersionString
24 | ${KEEPASSX_VERSION}
25 | CFBundleSignature
26 | KEPX
27 | CFBundleVersion
28 | ${KEEPASSX_VERSION_NUM}
29 | NSHumanReadableCopyright
30 | Copyright 2010-2012 KeePassX Development Team
31 | CFBundleDocumentTypes
32 |
33 |
34 | CFBundleTypeExtensions
35 |
36 | kdbx
37 |
38 | CFBundleTypeIconFile
39 | keepassx.icns
40 | CFBundleTypeName
41 | KeePassX Password Database
42 | CFBundleTypeOSTypes
43 |
44 | kdbx
45 |
46 | CFBundleTypeRole
47 | Editor
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/src/gui/ChangeMasterKeyWidget.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_CHANGEMASTERKEYWIDGET_H
19 | #define KEEPASSX_CHANGEMASTERKEYWIDGET_H
20 |
21 | #include
22 |
23 | #include "gui/DialogyWidget.h"
24 | #include "keys/CompositeKey.h"
25 |
26 | class QLabel;
27 | namespace Ui {
28 | class ChangeMasterKeyWidget;
29 | }
30 |
31 | class ChangeMasterKeyWidget : public DialogyWidget
32 | {
33 | Q_OBJECT
34 |
35 | public:
36 | explicit ChangeMasterKeyWidget(QWidget* parent = nullptr);
37 | ~ChangeMasterKeyWidget();
38 | void clearForms();
39 | CompositeKey newMasterKey();
40 | QLabel* headlineLabel();
41 |
42 | Q_SIGNALS:
43 | void editFinished(bool accepted);
44 |
45 | private Q_SLOTS:
46 | void generateKey();
47 | void reject();
48 | void createKeyFile();
49 | void browseKeyFile();
50 | void ykDetected(int slot, bool blocking);
51 |
52 | private:
53 | const QScopedPointer m_ui;
54 | CompositeKey m_key;
55 |
56 | Q_DISABLE_COPY(ChangeMasterKeyWidget)
57 | };
58 |
59 | #endif // KEEPASSX_CHANGEMASTERKEYWIDGET_H
60 |
--------------------------------------------------------------------------------
/src/gui/DatabaseWidgetStateSync.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 Felix Geyer
3 | * Copyright (C) 2014 Florian Geyer
4 | *
5 | * This program is free software: you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation, either version 2 or (at your option)
8 | * version 3 of the License.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License
16 | * along with this program. If not, see .
17 | */
18 |
19 | #ifndef KEEPASSX_DATABASEWIDGETSTATESYNC_H
20 | #define KEEPASSX_DATABASEWIDGETSTATESYNC_H
21 |
22 | #include "gui/DatabaseWidget.h"
23 |
24 | class DatabaseWidgetStateSync : public QObject
25 | {
26 | Q_OBJECT
27 |
28 | public:
29 | explicit DatabaseWidgetStateSync(QObject* parent = nullptr);
30 | ~DatabaseWidgetStateSync();
31 |
32 | public Q_SLOTS:
33 | void setActive(DatabaseWidget* dbWidget);
34 | void restoreListView();
35 | void restoreSearchView();
36 |
37 | private Q_SLOTS:
38 | void blockUpdates();
39 | void updateSplitterSizes();
40 | void updateColumnSizes();
41 |
42 | private:
43 | static QList variantToIntList(const QVariant& variant);
44 | static QVariant intListToVariant(const QList& list);
45 |
46 | DatabaseWidget* m_activeDbWidget;
47 |
48 | bool m_blockUpdates;
49 | QList m_splitterSizes;
50 | QList m_columnSizesList;
51 | QList m_columnSizesSearch;
52 | };
53 |
54 | #endif // KEEPASSX_DATABASEWIDGETSTATESYNC_H
55 |
--------------------------------------------------------------------------------
/src/keys/drivers/YubiKeyStub.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014 Kyle Manna
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #include
19 |
20 | #include "core/Global.h"
21 | #include "crypto/Random.h"
22 |
23 | #include "YubiKey.h"
24 |
25 | YubiKey::YubiKey() : m_yk_void(NULL), m_ykds_void(NULL)
26 | {
27 | }
28 |
29 | YubiKey* YubiKey::m_instance(Q_NULLPTR);
30 |
31 | YubiKey* YubiKey::instance()
32 | {
33 | if (!m_instance) {
34 | m_instance = new YubiKey();
35 | }
36 |
37 | return m_instance;
38 | }
39 |
40 | bool YubiKey::init()
41 | {
42 | return false;
43 | }
44 |
45 | bool YubiKey::deinit()
46 | {
47 | return false;
48 | }
49 |
50 | void YubiKey::detect()
51 | {
52 | }
53 |
54 | bool YubiKey::getSerial(unsigned int& serial) const
55 | {
56 | Q_UNUSED(serial);
57 |
58 | return false;
59 | }
60 |
61 | YubiKey::ChallengeResult YubiKey::challenge(int slot, bool mayBlock,
62 | const QByteArray& chal,
63 | QByteArray& resp) const
64 | {
65 | Q_UNUSED(slot);
66 | Q_UNUSED(mayBlock);
67 | Q_UNUSED(chal);
68 | Q_UNUSED(resp);
69 |
70 | return ERROR;
71 | }
72 |
--------------------------------------------------------------------------------
/tests/TestCryptoHash.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #include "TestCryptoHash.h"
19 |
20 | #include
21 |
22 | #include "crypto/Crypto.h"
23 | #include "crypto/CryptoHash.h"
24 |
25 | QTEST_GUILESS_MAIN(TestCryptoHash)
26 |
27 | void TestCryptoHash::initTestCase()
28 | {
29 | QVERIFY(Crypto::init());
30 | }
31 |
32 | void TestCryptoHash::test()
33 | {
34 | CryptoHash cryptoHash1(CryptoHash::Sha256);
35 | QCOMPARE(cryptoHash1.result(),
36 | QByteArray::fromHex("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"));
37 |
38 | QByteArray source2 = QString("KeePassX").toLatin1();
39 | QByteArray result2 = CryptoHash::hash(source2, CryptoHash::Sha256);
40 | QCOMPARE(result2, QByteArray::fromHex("0b56e5f65263e747af4a833bd7dd7ad26a64d7a4de7c68e52364893dca0766b4"));
41 |
42 | CryptoHash cryptoHash3(CryptoHash::Sha256);
43 | cryptoHash3.addData(QString("KeePa").toLatin1());
44 | cryptoHash3.addData(QString("ssX").toLatin1());
45 | QCOMPARE(cryptoHash3.result(),
46 | QByteArray::fromHex("0b56e5f65263e747af4a833bd7dd7ad26a64d7a4de7c68e52364893dca0766b4"));
47 | }
48 |
--------------------------------------------------------------------------------
/src/gui/entry/EntryHistoryModel.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_ENTRYHISTORYMODEL_H
19 | #define KEEPASSX_ENTRYHISTORYMODEL_H
20 |
21 | #include
22 |
23 | class Entry;
24 |
25 | class EntryHistoryModel : public QAbstractTableModel
26 | {
27 | Q_OBJECT
28 |
29 | public:
30 | explicit EntryHistoryModel(QObject* parent = nullptr);
31 |
32 | Entry* entryFromIndex(const QModelIndex& index) const;
33 | int columnCount(const QModelIndex& parent = QModelIndex()) const override;
34 | int rowCount(const QModelIndex& parent = QModelIndex()) const override;
35 | QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
36 | QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
37 |
38 | void setEntries(const QList& entries);
39 | void clear();
40 | QList deletedEntries();
41 | void deleteIndex(QModelIndex index);
42 | void deleteAll();
43 |
44 | private:
45 | QList m_historyEntries;
46 | QList m_deletedHistoryEntries;
47 | };
48 |
49 | #endif // KEEPASSX_ENTRYHISTORYMODEL_H
50 |
--------------------------------------------------------------------------------
/src/core/TimeDelta.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #include "TimeDelta.h"
19 |
20 | #include
21 |
22 | QDateTime operator+(const QDateTime& dateTime, const TimeDelta& delta) {
23 | return dateTime.addDays(delta.getDays())
24 | .addMonths(delta.getMonths())
25 | .addYears(delta.getYears());
26 | }
27 |
28 | TimeDelta TimeDelta::fromDays(int days)
29 | {
30 | return TimeDelta(days, 0, 0);
31 | }
32 |
33 | TimeDelta TimeDelta::fromMonths(int months)
34 | {
35 | return TimeDelta(0, months, 0);
36 | }
37 |
38 | TimeDelta TimeDelta::fromYears(int years)
39 | {
40 | return TimeDelta(0, 0, years);
41 | }
42 |
43 | TimeDelta::TimeDelta()
44 | : m_days(0)
45 | , m_months(0)
46 | , m_years(0)
47 | {
48 | }
49 |
50 | TimeDelta::TimeDelta(int days, int months, int years)
51 | : m_days(days)
52 | , m_months(months)
53 | , m_years(years)
54 | {
55 | }
56 |
57 | int TimeDelta::getDays() const
58 | {
59 | return m_days;
60 | }
61 |
62 | int TimeDelta::getMonths() const
63 | {
64 | return m_months;
65 | }
66 |
67 | int TimeDelta::getYears() const
68 | {
69 | return m_years;
70 | }
71 |
--------------------------------------------------------------------------------
/src/core/TimeInfo.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_TIMEINFO_H
19 | #define KEEPASSX_TIMEINFO_H
20 |
21 | #include
22 |
23 | class TimeInfo
24 | {
25 | public:
26 | TimeInfo();
27 |
28 | QDateTime lastModificationTime() const;
29 | QDateTime creationTime() const;
30 | QDateTime lastAccessTime() const;
31 | QDateTime expiryTime() const;
32 | bool expires() const;
33 | int usageCount() const;
34 | QDateTime locationChanged() const;
35 |
36 | void setLastModificationTime(const QDateTime& dateTime);
37 | void setCreationTime(const QDateTime& dateTime);
38 | void setLastAccessTime(const QDateTime& dateTime);
39 | void setExpiryTime(const QDateTime& dateTime);
40 | void setExpires(bool expires);
41 | void setUsageCount(int count);
42 | void setLocationChanged(const QDateTime& dateTime);
43 |
44 | private:
45 | QDateTime m_lastModificationTime;
46 | QDateTime m_creationTime;
47 | QDateTime m_lastAccessTime;
48 | QDateTime m_expiryTime;
49 | bool m_expires;
50 | int m_usageCount;
51 | QDateTime m_locationChanged;
52 | };
53 |
54 | #endif // KEEPASSX_TIMEINFO_H
55 |
--------------------------------------------------------------------------------
/src/crypto/Random.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2010 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_RANDOM_H
19 | #define KEEPASSX_RANDOM_H
20 |
21 | #include
22 | #include
23 |
24 | class RandomBackend
25 | {
26 | public:
27 | virtual void randomize(void* data, int len) = 0;
28 | virtual ~RandomBackend() {}
29 | };
30 |
31 | class Random
32 | {
33 | public:
34 | void randomize(QByteArray& ba);
35 | QByteArray randomArray(int len);
36 |
37 | /**
38 | * Generate a random quint32 in the range [0, @p limit)
39 | */
40 | quint32 randomUInt(quint32 limit);
41 |
42 | /**
43 | * Generate a random quint32 in the range [@p min, @p max)
44 | */
45 | quint32 randomUIntRange(quint32 min, quint32 max);
46 |
47 | static Random* instance();
48 | static void createWithBackend(RandomBackend* backend);
49 |
50 | private:
51 | explicit Random(RandomBackend* backend);
52 |
53 | QScopedPointer m_backend;
54 | static Random* m_instance;
55 |
56 | Q_DISABLE_COPY(Random)
57 | };
58 |
59 | inline Random* randomGen() {
60 | return Random::instance();
61 | }
62 |
63 | #endif // KEEPASSX_RANDOM_H
64 |
--------------------------------------------------------------------------------
/tests/TestAutoType.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_TESTAUTOTYPE_H
19 | #define KEEPASSX_TESTAUTOTYPE_H
20 |
21 | #include
22 |
23 | class AutoType;
24 | class AutoTypePlatformInterface;
25 | class AutoTypeTestInterface;
26 | class Database;
27 | class Entry;
28 | class Group;
29 |
30 | class TestAutoType : public QObject
31 | {
32 | Q_OBJECT
33 |
34 | private Q_SLOTS:
35 | void initTestCase();
36 | void init();
37 | void cleanup();
38 |
39 | void testInternal();
40 | void testAutoTypeWithoutSequence();
41 | void testAutoTypeWithSequence();
42 | void testGlobalAutoTypeWithNoMatch();
43 | void testGlobalAutoTypeWithOneMatch();
44 | void testGlobalAutoTypeTitleMatch();
45 | void testGlobalAutoTypeTitleMatchDisabled();
46 | void testGlobalAutoTypeRegExp();
47 |
48 | private:
49 | AutoTypePlatformInterface* m_platform;
50 | AutoTypeTestInterface* m_test;
51 | AutoType* m_autoType;
52 | Database* m_db;
53 | QList m_dbList;
54 | Group* m_group;
55 | Entry* m_entry1;
56 | Entry* m_entry2;
57 | Entry* m_entry3;
58 | };
59 |
60 | #endif // KEEPASSX_TESTAUTOTYPE_H
61 |
--------------------------------------------------------------------------------
/src/autotype/AutoTypePlatformPlugin.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_AUTOTYPEPLATFORMPLUGIN_H
19 | #define KEEPASSX_AUTOTYPEPLATFORMPLUGIN_H
20 |
21 | #include
22 |
23 | #include "autotype/AutoTypeAction.h"
24 |
25 | class AutoTypePlatformInterface
26 | {
27 | public:
28 | virtual ~AutoTypePlatformInterface() {}
29 | virtual bool isAvailable() = 0;
30 | virtual QStringList windowTitles() = 0;
31 | virtual WId activeWindow() = 0;
32 | virtual QString activeWindowTitle() = 0;
33 | virtual bool registerGlobalShortcut(Qt::Key key, Qt::KeyboardModifiers modifiers) = 0;
34 | virtual void unregisterGlobalShortcut(Qt::Key key, Qt::KeyboardModifiers modifiers) = 0;
35 | virtual int platformEventFilter(void* event) = 0;
36 | virtual int initialTimeout() = 0;
37 | virtual bool raiseWindow(WId window) = 0;
38 | virtual void unload() {}
39 |
40 | virtual AutoTypeExecutor* createExecutor() = 0;
41 |
42 | // implementations should also provide a globalShortcutTriggered() signal
43 | };
44 |
45 | Q_DECLARE_INTERFACE(AutoTypePlatformInterface, "org.keepassx.AutoTypePlatformInterface/1")
46 |
47 | #endif // KEEPASSX_AUTOTYPEPLATFORMPLUGIN_H
48 |
--------------------------------------------------------------------------------
/src/gui/entry/EntryAttachmentsModel.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 Felix Geyer
3 | *
4 | * This program is free software: you can redistribute it and/or modify
5 | * it under the terms of the GNU General Public License as published by
6 | * the Free Software Foundation, either version 2 or (at your option)
7 | * version 3 of the License.
8 | *
9 | * This program is distributed in the hope that it will be useful,
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | * GNU General Public License for more details.
13 | *
14 | * You should have received a copy of the GNU General Public License
15 | * along with this program. If not, see .
16 | */
17 |
18 | #ifndef KEEPASSX_ENTRYATTACHMENTSMODEL_H
19 | #define KEEPASSX_ENTRYATTACHMENTSMODEL_H
20 |
21 | #include
22 |
23 | class EntryAttachments;
24 |
25 | class EntryAttachmentsModel : public QAbstractListModel
26 | {
27 | Q_OBJECT
28 |
29 | public:
30 | explicit EntryAttachmentsModel(QObject* parent = nullptr);
31 | void setEntryAttachments(EntryAttachments* entry);
32 | int rowCount(const QModelIndex& parent = QModelIndex()) const override;
33 | int columnCount(const QModelIndex& parent = QModelIndex()) const override;
34 | QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
35 | QString keyByIndex(const QModelIndex& index) const;
36 |
37 | private Q_SLOTS:
38 | void attachmentChange(const QString& key);
39 | void attachmentAboutToAdd(const QString& key);
40 | void attachmentAdd();
41 | void attachmentAboutToRemove(const QString& key);
42 | void attachmentRemove();
43 | void aboutToReset();
44 | void reset();
45 |
46 | private:
47 | EntryAttachments* m_entryAttachments;
48 | };
49 |
50 | #endif // KEEPASSX_ENTRYATTACHMENTSMODEL_H
51 |
--------------------------------------------------------------------------------