[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics.spec
^
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -2,6 +2,6 @@
<service name="tar_git">
<param name="url">https://github.com/monich/harbour-foilpics.git</param>
<param name="branch">master</param>
- <param name="revision">0ac0f63</param>
+ <param name="revision">7cee10b</param>
</service>
</services>
\ No newline at end of file
|
[-]
[+]
|
Deleted |
_service:tar_git:harbour-foilpics-1.1.0.tar.gz/foil/VERSION
^
|
@@ -1 +0,0 @@
-1.0.23
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/app.pro
^
|
@@ -1,10 +1,9 @@
+PREFIX = harbour
NAME = foilpics
openrepos {
- PREFIX = openrepos
DEFINES += OPENREPOS
-} else {
- PREFIX = harbour
+ CONFIG += app_settings
}
TARGET = $${PREFIX}-$${NAME}
@@ -190,27 +189,26 @@
icon_dir = icons/$${s}x$${s}
$${icon_target}.files = $${icon_dir}/$${TARGET}.png
$${icon_target}.path = /usr/share/icons/hicolor/$${s}x$${s}/apps
- equals(PREFIX, "openrepos") {
- $${icon_target}.extra = cp $${icon_dir}/harbour-$${NAME}.png $$eval($${icon_target}.files)
- $${icon_target}.CONFIG += no_check_exist
- }
INSTALLS += $${icon_target}
}
-app_icon.files = icons/harbour-$${NAME}.svg
-app_icon.path = /usr/share/$${TARGET}/qml/images
-INSTALLS += app_icon
-
-# Desktop file
-equals(PREFIX, "openrepos") {
- desktop.extra = sed s/harbour/openrepos/g harbour-$${NAME}.desktop > $${TARGET}.desktop
- desktop.CONFIG += no_check_exist
+# Settings
+app_settings {
+ settings_json.files = settings/$${TARGET}.json
+ settings_json.path = /usr/share/jolla-settings/entries/
+ settings_qml.files = settings/*.qml
+ settings_qml.path = /usr/share/$${TARGET}/qml/settings/
+ INSTALLS += settings_qml settings_json
}
+OTHER_FILES += \
+ settings/*.qml \
+ settings/*.json
# Translations
TRANSLATION_IDBASED=-idbased
TRANSLATION_SOURCES = \
- $${_PRO_FILE_PWD_}/qml
+ $${_PRO_FILE_PWD_}/qml \
+ $${_PRO_FILE_PWD_}/settings
defineTest(addTrFile) {
rel = translations/$${1}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil-ui/FoilUiEnterPasswordView.qml
^
|
@@ -30,6 +30,8 @@
PullDownMenu {
id: pullDownMenu
+ visible: !Qt.inputMethod.visible
+
MenuItem {
text: foilUi.qsTrEnterPasswordViewMenuGenerateNewKey()
onClicked: pageStack.push(Qt.resolvedUrl("FoilUiGenerateKeyWarning.qml"), {
@@ -55,19 +57,15 @@
// Hide it when it's only partially visible (i.e. in langscape)
// or getting too close to the edge of the screen
- opacity: (y < Theme.paddingMedium) ? 0 : 1
- Behavior on opacity {
- enabled: !page.orientationTransitionRunning
- FadeAnimation { duration: 100 }
- }
+ opacity: (y < Theme.paddingLarge) ? 0 : 1
}
Item {
id: panel
width: parent.width
- height: childrenRect.height
- y: (parent.height > height) ? Math.floor((parent.height - height)/2) : (parent.height - height)
+ height: childrenRect.height + (landscapeLayout ? 0 : Theme.paddingLarge)
+ y: Math.min(Math.floor((screenHeight - height)/2), parent.height - height)
readonly property bool showLongPrompt: y >= Theme.paddingMedium
@@ -159,7 +157,7 @@
PropertyChanges {
target: button
anchors {
- topMargin: Theme.paddingLarge
+ topMargin: 0
rightMargin: 0
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/LICENSE
^
|
@@ -1,4 +1,4 @@
-Copyright (C) 2016-2021 by Slava Monich
+Copyright (C) 2016-2022 by Slava Monich
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/debian/changelog
^
|
@@ -1,3 +1,17 @@
+libfoil (1.0.25) unstable; urgency=low
+
+ * Added foil_kdf_pbkdf2()
+
+ -- Slava Monich <slava@monich.com> Sat, 28 May 2022 01:05:31 +0300
+
+libfoil (1.0.24) unstable; urgency=low
+
+ * Added version macros for compile-time version detection
+ * Added foil_version() for run-time version detection
+ * Made internal functions truly internal
+
+ -- Slava Monich <slava@monich.com> Fri, 27 May 2022 14:41:08 +0300
+
libfoil (1.0.23) unstable; urgency=low
* Replaced FoilParsePos with GUtilRange
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/debian/copyright
^
|
@@ -1,4 +1,4 @@
-Copyright (C) 2016-2021 by Slava Monich
+Copyright (C) 2016-2022 by Slava Monich
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/Makefile
^
|
@@ -43,13 +43,30 @@
all: debug release pkgconfig
#
+# Directories
+#
+
+SRC_DIR = src
+IMPL_SRC_DIR = src/$(IMPL)
+INCLUDE_DIR = include
+BUILD_DIR = build
+DEBUG_BUILD_DIR = $(BUILD_DIR)/debug
+RELEASE_BUILD_DIR = $(BUILD_DIR)/release
+COVERAGE_BUILD_DIR = $(BUILD_DIR)/coverage
+IMPL_DEBUG_BUILD_DIR = $(DEBUG_BUILD_DIR)/$(IMPL)
+IMPL_RELEASE_BUILD_DIR = $(RELEASE_BUILD_DIR)/$(IMPL)
+IMPL_COVERAGE_BUILD_DIR = $(COVERAGE_BUILD_DIR)/$(IMPL)
+
+#
# Library version
#
-VERSION_FILE = ../VERSION
-VERSION_MAJOR = $(shell head -1 $(VERSION_FILE) | cut -f1 -d.)
-VERSION_MINOR = $(shell head -1 $(VERSION_FILE) | cut -f2 -d.)
-VERSION_RELEASE = $(shell head -1 $(VERSION_FILE) | cut -f3 -d.)
+VERSION_FILE = $(INCLUDE_DIR)/foil_version.h
+get_version = $(shell grep -E "^ *\\\#define +FOIL_VERSION_$1 +[0-9]+$$" $(VERSION_FILE) | sed "s/ */ /g" | cut -d " " -f 3)
+
+VERSION_MAJOR = $(call get_version,MAJOR)
+VERSION_MINOR = $(call get_version,MINOR)
+VERSION_RELEASE = $(call get_version,RELEASE)
# Version for pkg-config
PCVERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_RELEASE)
@@ -90,6 +107,7 @@
foil_input_file.c \
foil_input_mem.c \
foil_input_range.c \
+ foil_kdf.c \
foil_key.c \
foil_key_aes.c \
foil_key_des.c \
@@ -104,7 +122,8 @@
foil_private_key.c \
foil_random.c \
foil_sign.c \
- foil_util.c
+ foil_util.c \
+ foil_version.c
IMPL_SRC = \
foil_openssl_cipher_des_cbc.c \
@@ -124,21 +143,6 @@
foil_openssl_rsa.c
#
-# Directories
-#
-
-SRC_DIR = src
-IMPL_SRC_DIR = src/$(IMPL)
-INCLUDE_DIR = include
-BUILD_DIR = build
-DEBUG_BUILD_DIR = $(BUILD_DIR)/debug
-RELEASE_BUILD_DIR = $(BUILD_DIR)/release
-COVERAGE_BUILD_DIR = $(BUILD_DIR)/coverage
-IMPL_DEBUG_BUILD_DIR = $(DEBUG_BUILD_DIR)/$(IMPL)
-IMPL_RELEASE_BUILD_DIR = $(RELEASE_BUILD_DIR)/$(IMPL)
-IMPL_COVERAGE_BUILD_DIR = $(COVERAGE_BUILD_DIR)/$(IMPL)
-
-#
# Tools and flags
#
@@ -337,7 +341,7 @@
INSTALL_PKGCONFIG_DIR = $(DESTDIR)$(ALIBDIR)/pkgconfig
install: $(INSTALL_LIB_DIR)
- $(INSTALL_FILES) $(RELEASE_SO) $(INSTALL_LIB_DIR)
+ $(INSTALL) -m 755 $(RELEASE_SO) $(INSTALL_LIB_DIR)
ln -sf $(LIB_SO) $(INSTALL_LIB_DIR)/$(LIB_SYMLINK2)
ln -sf $(LIB_SYMLINK2) $(INSTALL_LIB_DIR)/$(LIB_SYMLINK1)
|
[-]
[+]
|
Added |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/include/foil_kdf.h
^
|
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2022 by Slava Monich <slava@monich.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation
+ * are those of the authors and should not be interpreted as representing
+ * any official policies, either expressed or implied.
+ */
+
+#ifndef FOIL_KDF_H
+#define FOIL_KDF_H
+
+#include "foil_types.h"
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+/*
+ * KDF: Key Derivation Functions (RFC 2898)
+ *
+ * Since 1.0.25
+ */
+
+GBytes*
+foil_kdf_pbkdf2(
+ GType digest, /* HMAC digest algorithm, e.g. FOIL_DIGEST_SHA1 */
+ const char* pw, /* UTF-8 encoded password from which to derive the key */
+ gssize pwlen, /* Negative to strlen() the password */
+ const FoilBytes* salt,
+ guint iter, /* Number of iterations */
+ guint dklen); /* Derived key length, zero for auto (digest length) */
+
+G_END_DECLS
+
+#endif /* FOIL_KDF_H */
+
+/*
+ * Local Variables:
+ * mode: C
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/include/foil_types.h
^
|
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016-2021 by Slava Monich <slava@monich.com>
+ * Copyright (C) 2016-2022 by Slava Monich <slava@monich.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -37,6 +37,8 @@
#include <gutil_types.h>
+#include <foil_version.h>
+
G_BEGIN_DECLS
typedef struct foil_digest FoilDigest;
@@ -44,6 +46,7 @@
typedef struct foil_cmac FoilCmac;
typedef struct foil_hmac FoilHmac;
typedef struct foil_input FoilInput;
+typedef struct foil_kdf FoilKdf; /* Since 1.0.25 */
typedef struct foil_key FoilKey;
typedef struct foil_output FoilOutput;
typedef struct foil_private_key FoilPrivateKey;
|
[-]
[+]
|
Added |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/include/foil_version.h
^
|
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2022 by Slava Monich <slava@monich.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation
+ * are those of the authors and should not be interpreted as representing
+ * any official policies, either expressed or implied.
+ */
+
+#ifndef FOIL_VERSION_H
+#define FOIL_VERSION_H
+
+/*
+ * This header first appeared in version 1.0.24 therefore version checks
+ * in the code which is supposed to be compilable against earlier versions
+ * of libfoil should look like this:
+ *
+ * #if defined(FOIL_CORE_VERSION) && \
+ * FOIL_CORE_VERSION > FOIL_VERSION_WORD(1,0,24)
+ * ...
+ * #endif
+ *
+ * of better like this:
+ *
+ * #ifdef FOIL_VERSION_1_0_24
+ * ...
+ * #endif
+ *
+ * FOIL_VERSION_X_Y_Z macros will be added with each release. The fact that
+ * such macro is defined means that you're compiling against libfoil version
+ * X.Y.Z or greater.
+ */
+
+#define FOIL_VERSION_MAJOR 1
+#define FOIL_VERSION_MINOR 0
+#define FOIL_VERSION_RELEASE 25
+#define FOIL_VERSION_STRING "1.0.25"
+
+/* Version as a single word */
+#define FOIL_VERSION_WORD(v1,v2,v3) \
+ ((((v1) & 0x7f) << 24) | \
+ (((v2) & 0xfff) << 12) | \
+ ((v3) & 0xfff))
+
+#define FOIL_VERSION_GET_MAJOR(v) (((v) >> 24) & 0x7f)
+#define FOIL_VERSION_GET_MINOR(v) (((v) >> 12) & 0xfff)
+#define FOIL_VERSION_GET_RELEASE(v) ((v) & 0xfff)
+
+/*
+ * Function for run-time version detection in case if you're linking
+ * against a dynamic library.
+ */
+unsigned int
+foil_version(
+ void); /* Since 1.0.24 */
+
+/* Current version as a single word */
+#define FOIL_VERSION FOIL_VERSION_WORD \
+ (FOIL_VERSION_MAJOR, FOIL_VERSION_MINOR, FOIL_VERSION_RELEASE)
+
+/* Specific versions */
+#define FOIL_VERSION_1_0_24 FOIL_VERSION_WORD(1,0,24)
+#define FOIL_VERSION_1_0_25 FOIL_VERSION_WORD(1,0,25)
+
+#endif /* FOIL_VERSION_H */
+
+/*
+ * Local Variables:
+ * mode: C
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/foil_cipher_aes.h
^
|
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016-2019 by Slava Monich
+ * Copyright (C) 2016-2022 by Slava Monich
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -42,7 +42,7 @@
guint8 block[FOIL_AES_BLOCK_SIZE];
} FoilCipherAes;
-GType foil_cipher_aes_get_type(void);
+GType foil_cipher_aes_get_type(void) FOIL_INTERNAL;
#define FOIL_TYPE_CIPHER_AES (foil_cipher_aes_get_type())
#define FOIL_CIPHER_AES(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, \
FOIL_TYPE_CIPHER_AES, FoilCipherAes))
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/foil_cipher_p.h
^
|
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016-2019 by Slava Monich
+ * Copyright (C) 2016-2022 by Slava Monich
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -85,14 +85,16 @@
foil_cipher_default_padding_func(
guint8* block,
gsize data_size,
- gsize block_size);
+ gsize block_size)
+ FOIL_INTERNAL;
int
foil_cipher_symmetric_finish(
FoilCipher* cipher,
const void* from,
int flen,
- void* to);
+ void* to)
+ FOIL_INTERNAL;
#endif /* FOIL_CIPHER_P_H */
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/foil_cipher_sync.h
^
|
@@ -1,26 +1,31 @@
/*
- * Copyright (C) 2016-2017 by Slava Monich
+ * Copyright (C) 2016-2022 by Slava Monich
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
- * 1.Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2.Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING
- * IN ANY WAY OUT OF THE USE OR INABILITY TO USE THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
@@ -46,7 +51,7 @@
gint priority;
} FoilCipherSync;
-GType foil_cipher_sync_get_type(void);
+GType foil_cipher_sync_get_type(void) FOIL_INTERNAL;
#define FOIL_TYPE_CIPHER_SYNC (foil_cipher_sync_get_type())
#define FOIL_CIPHER_SYNC(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, \
FOIL_TYPE_CIPHER_SYNC, FoilCipherSync))
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/foil_digest_p.h
^
|
@@ -1,29 +1,31 @@
/*
- * Copyright (C) 2016-2021 by Slava Monich
+ * Copyright (C) 2016-2022 by Slava Monich
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
- * 1.Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2.Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the names of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING
- * IN ANY WAY OUT OF THE USE OR INABILITY TO USE THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
@@ -66,11 +68,11 @@
typedef FoilDigestClass FoilDigestSHA512Class;
/* Abstract types */
-GType foil_digest_get_type(void);
-GType foil_digest_md5_get_type(void);
-GType foil_digest_sha1_get_type(void);
-GType foil_digest_sha256_get_type(void);
-GType foil_digest_sha512_get_type(void);
+GType foil_digest_get_type(void) FOIL_INTERNAL;
+GType foil_digest_md5_get_type(void) FOIL_INTERNAL;
+GType foil_digest_sha1_get_type(void) FOIL_INTERNAL;
+GType foil_digest_sha256_get_type(void) FOIL_INTERNAL;
+GType foil_digest_sha512_get_type(void) FOIL_INTERNAL;
#define FOIL_TYPE_DIGEST (foil_digest_get_type())
#define FOIL_TYPE_DIGEST_MD5 (foil_digest_md5_get_type())
#define FOIL_TYPE_DIGEST_SHA1 (foil_digest_sha1_get_type())
@@ -84,11 +86,13 @@
gsize
foil_digest_type_block_size(
- GType type);
+ GType type)
+ FOIL_INTERNAL;
gsize
foil_digest_block_size(
- FoilDigest* digest);
+ FoilDigest* digest)
+ FOIL_INTERNAL;
#endif /* FOIL_DIGEST_P_H */
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/foil_input_p.h
^
|
@@ -1,26 +1,31 @@
/*
- * Copyright (C) 2016-2017 by Slava Monich
+ * Copyright (C) 2016-2022 by Slava Monich
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
- * 1.Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2.Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING
- * IN ANY WAY OUT OF THE USE OR INABILITY TO USE THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
@@ -30,6 +35,7 @@
#ifndef FOIL_INPUT_P_H
#define FOIL_INPUT_P_H
+#include "foil_types_p.h"
#include "foil_input.h"
typedef struct foil_input_func {
@@ -51,17 +57,20 @@
FoilInput*
foil_input_init(
FoilInput* in,
- const FoilInputFunc* fn);
+ const FoilInputFunc* fn)
+ FOIL_INTERNAL;
void
foil_input_finalize(
- FoilInput* in);
+ FoilInput* in)
+ FOIL_INTERNAL;
void
foil_input_push_back(
FoilInput* in,
const void* buf,
- gsize size);
+ gsize size)
+ FOIL_INTERNAL;
#endif /* FOIL_INPUT_P_H */
|
[-]
[+]
|
Added |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/foil_kdf.c
^
|
@@ -0,0 +1,187 @@
+/*
+ * Copyright (C) 2022 by Slava Monich <slava@monich.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation
+ * are those of the authors and should not be interpreted as representing
+ * any official policies, either expressed or implied.
+ */
+
+#include "foil_kdf.h"
+#include "foil_hmac.h"
+#include "foil_digest.h"
+
+/*
+ * KDF: Key Derivation Functions (RFC 2898)
+ *
+ * Since 1.0.25
+ */
+
+/*
+ * RFC 2898
+ *
+ * 5.2 PBKDF2
+ *
+ * ...
+ *
+ * PBKDF2 (P, S, c, dkLen)
+ *
+ * Options: PRF underlying pseudorandom function (hLen
+ * denotes the length in octets of the
+ * pseudorandom function output)
+ *
+ * Input: P password, an octet string
+ * S salt, an octet string
+ * c iteration count, a positive integer
+ * dkLen intended length in octets of the derived
+ * key, a positive integer, at most
+ * (2^32 - 1) * hLen
+ *
+ * Output: DK derived key, a dkLen-octet string
+ */
+GBytes*
+foil_kdf_pbkdf2(
+ GType digest, /* HMAC digest algorithm, e.g. FOIL_DIGEST_SHA1 */
+ const char* pw, /* UTF-8 encoded password from which to derive the key */
+ gssize pwlen, /* Negative to strlen() the password */
+ const FoilBytes* salt,
+ guint iter, /* Number of iterations */
+ guint dlen) /* Derived key length, zero for auto (digest length) */
+{
+ const gsize hlen = foil_digest_type_size(digest);
+ const gsize dklen = dlen ? dlen : hlen;
+
+ /*
+ * 1. If dkLen > (2^32 - 1) * hLen, output "derived key too long" and
+ * stop. (we skip that because our dlen won't exceed 0xffffffff)
+ */
+ if ((pw || !pwlen) && salt && iter && hlen) {
+ /*
+ * This one must succeed because non-zero hlen guarantees that
+ * the digest type is valid.
+ */
+ FoilHmac* pmac = foil_hmac_new(digest, pw, (pwlen >= 0) ?
+ pwlen : strlen(pw));
+
+ /*
+ * 2. Let l be the number of hLen-octet blocks in the derived key,
+ * rounding up, and let r be the number of octets in the last
+ * block:
+ *
+ * l = CEIL (dkLen / hLen) ,
+ * r = dkLen - (l - 1) * hLen .
+ *
+ * Here, CEIL (x) is the "ceiling" function, i.e. the smallest
+ * integer greater than, or equal to, x.
+ *
+ * 3. For each block of the derived key apply the function F defined
+ * below to the password P, the salt S, the iteration count c, and
+ * the block index to compute the block:
+ *
+ * T_1 = F (P, S, c, 1) ,
+ * T_2 = F (P, S, c, 2) ,
+ * ...
+ * T_l = F (P, S, c, l) ,
+ *
+ * where the function F is defined as the exclusive-or sum of the
+ * first c iterates of the underlying pseudorandom function PRF
+ * applied to the password P and the concatenation of the salt S
+ * and the block index i:
+ *
+ * F (P, S, c, i) = U_1 \xor U_2 \xor ... \xor U_c
+ *
+ * where
+ *
+ * U_1 = PRF (P, S || INT (i)) ,
+ * U_2 = PRF (P, U_1) ,
+ * ...
+ * U_c = PRF (P, U_{c-1}) .
+ *
+ * Here, INT (i) is a four-octet encoding of the integer i, most
+ * significant octet first.
+ */
+ guint8* key = g_malloc(dklen);
+ gsize offset = 0;
+ guint i = 1;
+
+ while (offset < dklen) {
+ const gsize remaining = dklen - offset;
+ const gsize blocklen = MIN(remaining, hlen);
+ const guint32 ibuf = htobe32(i);
+ guint8* block = key + offset;
+ FoilHmac* prf;
+ const guint8* prev;
+ GBytes* prev_bytes;
+ guint m;
+
+ /* U_1 = PRF (P, S || INT (i)) */
+ prf = foil_hmac_clone(pmac);
+ foil_hmac_update(prf, salt->val, salt->len);
+ foil_hmac_update(prf, &ibuf, sizeof(ibuf));
+ prev_bytes = foil_hmac_free_to_bytes(prf);
+ prev = g_bytes_get_data(prev_bytes, NULL);
+ memcpy(block, prev, blocklen);
+
+ for (m = 1; m < iter; m++) {
+ GBytes* next_bytes;
+ const guint8* next;
+ guint k;
+
+ /* U_m = PRF (P, U_{m-1}) */
+ prf = foil_hmac_clone(pmac);
+ foil_hmac_update(prf, prev, hlen);
+ next_bytes = foil_hmac_free_to_bytes(prf);
+ next = g_bytes_get_data(next_bytes, NULL);
+ for (k = 0; k < blocklen; k++) {
+ block[k] ^= next[k];
+ }
+
+ g_bytes_unref(prev_bytes);
+ prev_bytes = next_bytes;
+ prev = next;
+ }
+
+ g_bytes_unref(prev_bytes);
+ offset += blocklen;
+ i++;
+ }
+
+ foil_hmac_unref(pmac);
+ return g_bytes_new_take(key, dklen);
+ } else {
+ return NULL;
+ }
+}
+
+/*
+ * Local Variables:
+ * mode: C
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/foil_key_des_p.h
^
|
@@ -33,8 +33,8 @@
#ifndef FOIL_KEY_DES_P_H
#define FOIL_KEY_DES_P_H
-#include "foil_key_des.h"
#include "foil_key_p.h"
+#include "foil_key_des.h"
typedef struct foil_key_des_class FoilKeyDesClass;
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/foil_key_p.h
^
|
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016-2019 by Slava Monich
+ * Copyright (C) 2016-2022 by Slava Monich
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -71,7 +71,8 @@
foil_key_set_iv(
FoilKey* key,
const void* iv,
- gsize len);
+ gsize len)
+ FOIL_INTERNAL;
#endif /* FOIL_KEY_P_H */
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/foil_key_rsa_private.h
^
|
@@ -1,26 +1,31 @@
/*
- * Copyright (C) 2016-2019 by Slava Monich
+ * Copyright (C) 2016-2022 by Slava Monich
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
- * 1.Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2.Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING
- * IN ANY WAY OUT OF THE USE OR INABILITY TO USE THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
@@ -77,7 +82,8 @@
void
foil_key_rsa_private_get_public_data(
FoilKeyRsaPrivate* priv,
- FoilKeyRsaPublicData* pub_data);
+ FoilKeyRsaPublicData* pub_data)
+ FOIL_INTERNAL;
#endif /* FOIL_KEY_PRIVATE_H */
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/foil_key_rsa_public.h
^
|
@@ -5,22 +5,27 @@
* modification, are permitted provided that the following conditions
* are met:
*
- * 1.Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2.Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING
- * IN ANY WAY OUT OF THE USE OR INABILITY TO USE THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
@@ -58,11 +63,13 @@
void
foil_key_rsa_public_set_data(
FoilKeyRsaPublic* pub,
- const FoilKeyRsaPublicData* data);
+ const FoilKeyRsaPublicData* data)
+ FOIL_INTERNAL;
GBytes*
foil_key_rsa_public_data_fingerprint(
- const FoilKeyRsaPublicData* data);
+ const FoilKeyRsaPublicData* data)
+ FOIL_INTERNAL;
#endif /* FOIL_KEY_PUBLIC_H */
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/foil_output_p.h
^
|
@@ -1,26 +1,31 @@
/*
- * Copyright (C) 2016-2017 by Slava Monich
+ * Copyright (C) 2016-2022 by Slava Monich
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
- * 1.Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2.Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING
- * IN ANY WAY OUT OF THE USE OR INABILITY TO USE THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
@@ -30,6 +35,7 @@
#ifndef FOIL_OUTPUT_P_H
#define FOIL_OUTPUT_P_H
+#include "foil_types_p.h"
#include "foil_output.h"
typedef struct foil_output_func {
@@ -51,7 +57,8 @@
FoilOutput*
foil_output_init(
FoilOutput* out,
- const FoilOutputFunc* fn);
+ const FoilOutputFunc* fn)
+ FOIL_INTERNAL;
#endif /* FOIL_OUTPUT_P_H */
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/foil_pool.h
^
|
@@ -1,26 +1,31 @@
/*
- * Copyright (C) 2019 by Slava Monich
+ * Copyright (C) 2019-2022 by Slava Monich
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
- * 1.Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2.Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING
- * IN ANY WAY OUT OF THE USE OR INABILITY TO USE THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
@@ -30,7 +35,7 @@
#ifndef FOIL_POOL_H
#define FOIL_POOL_H
-#include "foil_types.h"
+#include "foil_types_p.h"
typedef struct foil_pool_item FoilPoolItem;
@@ -41,27 +46,32 @@
void
foil_pool_init(
- FoilPool* pool);
+ FoilPool* pool)
+ FOIL_INTERNAL;
void
foil_pool_drain(
- FoilPool* pool);
+ FoilPool* pool)
+ FOIL_INTERNAL;
void
foil_pool_add(
FoilPool* pool,
gpointer pointer,
- GDestroyNotify destroy);
+ GDestroyNotify destroy)
+ FOIL_INTERNAL;
void
foil_pool_add_bytes(
FoilPool* pool,
- GBytes* bytes);
+ GBytes* bytes)
+ FOIL_INTERNAL;
void
foil_pool_add_bytes_ref(
FoilPool* pool,
- GBytes* bytes);
+ GBytes* bytes)
+ FOIL_INTERNAL;
#endif /* FOIL_POOL_H */
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/foil_random_p.h
^
|
@@ -1,26 +1,31 @@
/*
- * Copyright (C) 2016 by Slava Monich
+ * Copyright (C) 2016-2022 by Slava Monich
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
- * 1.Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2.Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING
- * IN ANY WAY OUT OF THE USE OR INABILITY TO USE THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
@@ -43,7 +48,7 @@
GObject object;
};
-GType foil_random_get_type(void);
+GType foil_random_get_type(void) FOIL_INTERNAL;
#define FOIL_TYPE_RANDOM (foil_random_get_type())
#define FOIL_RANDOM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \
FOIL_TYPE_RANDOM, FoilRandomClass))
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/foil_types_p.h
^
|
@@ -1,26 +1,31 @@
/*
- * Copyright (C) 2016-2019 by Slava Monich
+ * Copyright (C) 2016-2022 by Slava Monich
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
- * 1.Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2.Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING
- * IN ANY WAY OUT OF THE USE OR INABILITY TO USE THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
@@ -38,6 +43,8 @@
typedef struct foil_key_rsa_public_data FoilKeyRsaPublicData;
+#define FOIL_INTERNAL G_GNUC_INTERNAL
+
#define FOIL_ALIGN(x) G_ALIGN4(x)
#define FOIL_BYTES_SET(bytes,data) \
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/foil_util_p.h
^
|
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016-2021 by Slava Monich <slava@monich.com>
+ * Copyright (C) 2016-2022 by Slava Monich <slava@monich.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -35,70 +35,82 @@
#ifndef FOIL_UTIL_P_H
#define FOIL_UTIL_P_H
-#include "foil_util.h"
#include "foil_types_p.h"
+#include "foil_util.h"
guint8*
foil_bytes_copy(
FoilBytes* dest,
const FoilBytes* src,
- guint8* ptr);
+ guint8* ptr)
+ FOIL_INTERNAL;
void
foil_bytes_digest(
FoilBytes* bytes,
- FoilDigest* digest);
+ FoilDigest* digest)
+ FOIL_INTERNAL;
void*
foil_class_ref(
GType type,
- GType base);
+ GType base)
+ FOIL_INTERNAL;
void*
foil_abstract_class_ref(
GType type,
- GType base);
+ GType base)
+ FOIL_INTERNAL;
gsize
foil_parse_init_data(
GUtilRange* pos,
- const FoilBytes* data);
+ const FoilBytes* data)
+ FOIL_INTERNAL;
gsize
foil_parse_init_bytes(
GUtilRange* pos,
- GBytes* bytes);
+ GBytes* bytes)
+ FOIL_INTERNAL;
gsize
foil_parse_init_string(
GUtilRange* pos,
- const char* str);
+ const char* str)
+ FOIL_INTERNAL;
gboolean
foil_parse_skip_to_next_line(
GUtilRange* pos,
- gboolean continued);
+ gboolean continued)
+ FOIL_INTERNAL;
GHashTable*
foil_parse_headers(
GUtilRange* pos,
- GString* buf);
+ GString* buf)
+ FOIL_INTERNAL;
char*
foil_format_header(
const char* tag,
- const char* value);
+ const char* value)
+ FOIL_INTERNAL;
GHashTable*
foil_param_add(
GHashTable* params,
const char* key,
- const char* value);
+ const char* value)
+ FOIL_INTERNAL;
const void*
foil_memmem(
const FoilBytes* haystack,
- const FoilBytes* needle);
+ const FoilBytes* needle)
+ FOIL_INTERNAL;
#endif /* FOIL_UTIL_P_H */
|
[-]
[+]
|
Added |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/foil_version.c
^
|
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2022 by Slava Monich <slava@monich.com>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation
+ * are those of the authors and should not be interpreted as representing
+ * any official policies, either expressed or implied.
+ */
+
+#include "foil_version.h"
+
+/*
+ * Function for run-time version detection in case if you're linking
+ * against a dynamic library
+ */
+unsigned int
+foil_version() /* Since 1.0.24 */
+{
+ return FOIL_VERSION;
+}
+
+/*
+ * Local Variables:
+ * mode: C
+ * c-basic-offset: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/openssl/foil_openssl_cipher_aes_decrypt.c
^
|
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016-2019 by Slava Monich
+ * Copyright (C) 2016-2022 by Slava Monich
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -51,6 +51,11 @@
typedef FoilOpensslCipherAesDecrypt FoilOpensslCipherAesCfbDecrypt;
typedef FoilOpensslCipherAesDecrypt FoilOpensslCipherAesEcbDecrypt;
+GType foil_openssl_cipher_aes_decrypt_get_type() FOIL_INTERNAL;
+GType foil_openssl_cipher_aes_cbc_decrypt_get_type() FOIL_INTERNAL;
+GType foil_openssl_cipher_aes_cfb_decrypt_get_type() FOIL_INTERNAL;
+GType foil_openssl_cipher_aes_ecb_decrypt_get_type() FOIL_INTERNAL;
+
G_DEFINE_ABSTRACT_TYPE(FoilOpensslCipherAesDecrypt,
foil_openssl_cipher_aes_decrypt, FOIL_TYPE_CIPHER_AES)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/openssl/foil_openssl_cipher_aes_encrypt.c
^
|
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016-2019 by Slava Monich
+ * Copyright (C) 2016-2022 by Slava Monich
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -47,6 +47,11 @@
typedef FoilOpensslCipherAesEncrypt FoilOpensslCipherAesCfbEncrypt;
typedef FoilOpensslCipherAesEncrypt FoilOpensslCipherAesEcbEncrypt;
+GType foil_openssl_cipher_aes_encrypt_get_type() FOIL_INTERNAL;
+GType foil_openssl_cipher_aes_cbc_encrypt_get_type() FOIL_INTERNAL;
+GType foil_openssl_cipher_aes_cfb_encrypt_get_type() FOIL_INTERNAL;
+GType foil_openssl_cipher_aes_ecb_encrypt_get_type() FOIL_INTERNAL;
+
G_DEFINE_ABSTRACT_TYPE(FoilOpensslCipherAesEncrypt,
foil_openssl_cipher_aes_encrypt, FOIL_TYPE_CIPHER_AES)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/openssl/foil_openssl_cipher_des_cbc.c
^
|
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2019 by Slava Monich
+ * Copyright (C) 2019-2022 by Slava Monich
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -55,6 +55,10 @@
typedef FoilOpensslCipherDesCbcClass FoilOpensslCipherDesCbcEncryptClass;
typedef FoilOpensslCipherDesCbcClass FoilOpensslCipherDesCbcDecryptClass;
+GType foil_openssl_cipher_des_cbc_get_type() FOIL_INTERNAL;
+GType foil_openssl_cipher_des_cbc_encrypt_get_type() FOIL_INTERNAL;
+GType foil_openssl_cipher_des_cbc_decrypt_get_type() FOIL_INTERNAL;
+
G_DEFINE_ABSTRACT_TYPE(FoilOpensslCipherDesCbc,
foil_openssl_cipher_des_cbc,
FOIL_TYPE_CIPHER_SYNC);
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/openssl/foil_openssl_cipher_rsa_decrypt.c
^
|
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016-2019 by Slava Monich
+ * Copyright (C) 2016-2022 by Slava Monich
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -40,6 +40,8 @@
typedef FoilOpensslCipherRsaClass FoilOpensslCipherRsaDecryptClass;
typedef FoilOpensslCipherRsa FoilOpensslCipherRsaDecrypt;
+GType foil_openssl_cipher_rsa_decrypt_get_type() FOIL_INTERNAL;
+
G_DEFINE_TYPE(FoilOpensslCipherRsaDecrypt, foil_openssl_cipher_rsa_decrypt,
FOIL_OPENSSL_TYPE_CIPHER_RSA)
#define FOIL_OPENSSL_TYPE_CIPHER_RSA_DECRYPT \
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/openssl/foil_openssl_cipher_rsa_encrypt.c
^
|
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016-2019 by Slava Monich
+ * Copyright (C) 2016-2022 by Slava Monich
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -40,6 +40,8 @@
typedef FoilOpensslCipherRsaClass FoilOpensslCipherRsaEncryptClass;
typedef FoilOpensslCipherRsa FoilOpensslCipherRsaEncrypt;
+GType foil_openssl_cipher_rsa_encrypt_get_type() FOIL_INTERNAL;
+
G_DEFINE_TYPE(FoilOpensslCipherRsaEncrypt, foil_openssl_cipher_rsa_encrypt,
FOIL_OPENSSL_TYPE_CIPHER_RSA)
#define FOIL_OPENSSL_TYPE_CIPHER_RSA_ENCRYPT \
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/openssl/foil_openssl_des.h
^
|
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2019 by Slava Monich
+ * Copyright (C) 2019-2022 by Slava Monich
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -52,7 +52,7 @@
FoilOpensslKeyDesData* k3;
} FoilOpensslKeyDes;
-GType foil_openssl_key_des_get_type(void);
+GType foil_openssl_key_des_get_type(void) FOIL_INTERNAL;
#define FOIL_OPENSSL_TYPE_KEY_DES (foil_openssl_key_des_get_type())
#define FOIL_OPENSSL_KEY_DES(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, \
FOIL_OPENSSL_TYPE_KEY_DES, FoilOpensslKeyDes))
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/openssl/foil_openssl_digest_md5.c
^
|
@@ -1,26 +1,31 @@
/*
- * Copyright (C) 2016-2018 by Slava Monich
+ * Copyright (C) 2016-2022 by Slava Monich
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
- * 1.Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2.Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING
- * IN ANY WAY OUT OF THE USE OR INABILITY TO USE THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
@@ -41,6 +46,8 @@
MD5_CTX ctx;
} FoilOpensslDigestMD5;
+GType foil_openssl_digest_md5_get_type() FOIL_INTERNAL;
+
G_DEFINE_TYPE(FoilOpensslDigestMD5, foil_openssl_digest_md5, \
FOIL_TYPE_DIGEST_MD5)
#define FOIL_OPENSSL_DIGEST_MD5(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, \
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/openssl/foil_openssl_digest_sha1.c
^
|
@@ -1,26 +1,31 @@
/*
- * Copyright (C) 2016-2018 by Slava Monich
+ * Copyright (C) 2016-2022 by Slava Monich
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
- * 1.Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2.Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING
- * IN ANY WAY OUT OF THE USE OR INABILITY TO USE THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
@@ -41,6 +46,8 @@
SHA_CTX ctx;
} FoilOpensslDigestSHA1;
+GType foil_openssl_digest_sha1_get_type() FOIL_INTERNAL;
+
G_DEFINE_TYPE(FoilOpensslDigestSHA1, foil_openssl_digest_sha1, \
FOIL_TYPE_DIGEST_SHA1)
#define FOIL_OPENSSL_DIGEST_SHA1(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, \
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/openssl/foil_openssl_digest_sha256.c
^
|
@@ -1,26 +1,31 @@
/*
- * Copyright (C) 2016-2018 by Slava Monich
+ * Copyright (C) 2016-2022 by Slava Monich
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
- * 1.Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2.Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING
- * IN ANY WAY OUT OF THE USE OR INABILITY TO USE THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
@@ -41,6 +46,8 @@
SHA256_CTX ctx;
} FoilOpensslDigestSHA256;
+GType foil_openssl_digest_sha256_get_type() FOIL_INTERNAL;
+
G_DEFINE_TYPE(FoilOpensslDigestSHA256, foil_openssl_digest_sha256, \
FOIL_TYPE_DIGEST_SHA256)
#define FOIL_OPENSSL_DIGEST_SHA256(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, \
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/openssl/foil_openssl_digest_sha512.c
^
|
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2021 by Slava Monich
+ * Copyright (C) 2021-2022 by Slava Monich
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -44,6 +44,8 @@
SHA512_CTX ctx;
} FoilOpensslDigestSHA512;
+GType foil_openssl_digest_sha512_get_type() FOIL_INTERNAL;
+
G_DEFINE_TYPE(FoilOpensslDigestSHA512, foil_openssl_digest_sha512, \
FOIL_TYPE_DIGEST_SHA512)
#define FOIL_OPENSSL_DIGEST_SHA512(obj) (G_TYPE_CHECK_INSTANCE_CAST(obj, \
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/openssl/foil_openssl_random.h
^
|
@@ -1,26 +1,31 @@
/*
- * Copyright (C) 2016-2018 by Slava Monich
+ * Copyright (C) 2016-2022 by Slava Monich
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
- * 1.Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2.Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING
- * IN ANY WAY OUT OF THE USE OR INABILITY TO USE THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
@@ -30,13 +35,14 @@
#ifndef FOIL_OPENSSL_RANDOM_H
#define FOIL_OPENSSL_RANDOM_H
-#include "foil_types.h"
+#include "foil_types_p.h"
#include <glib-object.h>
GType
foil_openssl_random_get_type(
- void);
+ void)
+ FOIL_INTERNAL;
#endif /* FOIL_OPENSSL_RANDOM_H */
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/libfoil/src/openssl/foil_openssl_rsa.h
^
|
@@ -1,26 +1,31 @@
/*
- * Copyright (C) 2016-2019 by Slava Monich
+ * Copyright (C) 2016-2022 by Slava Monich
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
- * 1.Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2.Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
*
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING
- * IN ANY WAY OUT OF THE USE OR INABILITY TO USE THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation
* are those of the authors and should not be interpreted as representing
@@ -48,99 +53,117 @@
unsigned char *to, RSA *rsa, int padding);
} FoilOpensslCipherRsa;
-GType foil_openssl_cipher_rsa_get_type(void);
+GType foil_openssl_cipher_rsa_get_type(void) FOIL_INTERNAL;
#define FOIL_OPENSSL_TYPE_CIPHER_RSA foil_openssl_cipher_rsa_get_type()
typedef FoilKeyRsaPrivate FoilOpensslKeyRsaPrivate;
-GType foil_openssl_key_rsa_private_get_type(void);
+GType foil_openssl_key_rsa_private_get_type(void) FOIL_INTERNAL;
#define FOIL_OPENSSL_TYPE_KEY_RSA_PRIVATE \
foil_openssl_key_rsa_private_get_type()
void
foil_openssl_key_rsa_private_apply(
FoilKeyRsaPrivate* priv,
- RSA* rsa);
+ RSA* rsa)
+ FOIL_INTERNAL;
void
foil_openssl_key_rsa_public_apply(
FoilKeyRsaPublic* pub,
- RSA* rsa);
+ RSA* rsa)
+ FOIL_INTERNAL;
/* Getters for RSA fields */
const BIGNUM*
foil_openssl_rsa_get_n(
- const RSA* rsa);
+ const RSA* rsa)
+ FOIL_INTERNAL;
const BIGNUM*
foil_openssl_rsa_get_e(
- const RSA* rsa);
+ const RSA* rsa)
+ FOIL_INTERNAL;
const BIGNUM*
foil_openssl_rsa_get_d(
- const RSA* rsa);
+ const RSA* rsa)
+ FOIL_INTERNAL;
const BIGNUM*
foil_openssl_rsa_get_p(
- const RSA* rsa);
+ const RSA* rsa)
+ FOIL_INTERNAL;
const BIGNUM*
foil_openssl_rsa_get_q(
- const RSA* rsa);
+ const RSA* rsa)
+ FOIL_INTERNAL;
const BIGNUM*
foil_openssl_rsa_get_dmp1(
- const RSA* rsa);
+ const RSA* rsa)
+ FOIL_INTERNAL;
const BIGNUM*
foil_openssl_rsa_get_dmq1(
- const RSA* rsa);
+ const RSA* rsa)
+ FOIL_INTERNAL;
const BIGNUM*
foil_openssl_rsa_get_iqmp(
- const RSA* rsa);
+ const RSA* rsa)
+ FOIL_INTERNAL;
/* Setters for RSA fields */
const BIGNUM*
foil_openssl_rsa_set_n(
RSA* rsa,
- const FoilBytes* bytes);
+ const FoilBytes* bytes)
+ FOIL_INTERNAL;
const BIGNUM*
foil_openssl_rsa_set_e(
RSA* rsa,
- const FoilBytes* bytes);
+ const FoilBytes* bytes)
+ FOIL_INTERNAL;
const BIGNUM*
foil_openssl_rsa_set_d(
RSA* rsa,
- const FoilBytes* bytes);
+ const FoilBytes* bytes)
+ FOIL_INTERNAL;
const BIGNUM*
foil_openssl_rsa_set_p(
RSA* rsa,
- const FoilBytes* bytes);
+ const FoilBytes* bytes)
+ FOIL_INTERNAL;
const BIGNUM*
foil_openssl_rsa_set_q(
RSA* rsa,
- const FoilBytes* bytes);
+ const FoilBytes* bytes)
+ FOIL_INTERNAL;
const BIGNUM*
foil_openssl_rsa_set_dmp1(
RSA* rsa,
- const FoilBytes* bytes);
+ const FoilBytes* bytes)
+ FOIL_INTERNAL;
const BIGNUM*
foil_openssl_rsa_set_dmq1(
RSA* rsa,
- const FoilBytes* bytes);
+ const FoilBytes* bytes)
+ FOIL_INTERNAL;
const BIGNUM*
foil_openssl_rsa_set_iqmp(
RSA* rsa,
- const FoilBytes* bytes);
+ const FoilBytes* bytes)
+ FOIL_INTERNAL;
#define FOIL_RSA_FIELD(rsa,x) foil_openssl_rsa_get_##x(rsa)
#define FOIL_RSA_KEY_SET_BN(rsa,x,data) foil_openssl_rsa_set_##x(rsa, &(data)->x)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/rpm/foil.spec
^
|
@@ -1,5 +1,6 @@
Name: libfoil
-Version: 1.0.23
+
+Version: 1.0.25
Release: 0
Summary: Yet another glib-style crypto API
Group: Development/Libraries
@@ -46,8 +47,8 @@
%setup -q
%build
-make -C libfoil LIBDIR=%{_libdir} KEEP_SYMBOLS=1 release pkgconfig
-make -C tools LIBDIR=%{_libdir} KEEP_SYMBOLS=1 release
+make -C libfoil %{_smp_mflags} LIBDIR=%{_libdir} KEEP_SYMBOLS=1 release pkgconfig
+make -C tools %{_smp_mflags} LIBDIR=%{_libdir} KEEP_SYMBOLS=1 release
%install
rm -rf %{buildroot}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/test/common/Makefile
^
|
@@ -15,6 +15,8 @@
SRC = $(EXE).c
endif
+COMMON_SRC ?= test_main.c
+
#
# Required packages
#
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/test/coverage/run
^
|
@@ -16,6 +16,7 @@
test_digest \
test_hmac \
test_input \
+test_kdf \
test_key_aes \
test_key_des \
test_key_rsa \
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/test/libfoil/Makefile
^
|
@@ -14,6 +14,7 @@
@$(MAKE) -C test_digest $*
@$(MAKE) -C test_hmac $*
@$(MAKE) -C test_input $*
+ @$(MAKE) -C test_kdf $*
@$(MAKE) -C test_key_aes $*
@$(MAKE) -C test_key_des $*
@$(MAKE) -C test_key_rsa $*
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/test/libfoil/test_cipher/Makefile
^
|
@@ -1,6 +1,5 @@
# -*- Mode: makefile-gmake -*-
EXE = test_cipher
-COMMON_SRC = test_main.c
include ../../common/Makefile
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/test/libfoil/test_cmac/Makefile
^
|
@@ -1,6 +1,5 @@
# -*- Mode: makefile-gmake -*-
EXE = test_cmac
-COMMON_SRC = test_main.c
include ../../common/Makefile
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/test/libfoil/test_digest/Makefile
^
|
@@ -1,6 +1,5 @@
# -*- Mode: makefile-gmake -*-
EXE = test_digest
-COMMON_SRC = test_main.c
include ../../common/Makefile
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/test/libfoil/test_hmac/Makefile
^
|
@@ -1,6 +1,5 @@
# -*- Mode: makefile-gmake -*-
EXE = test_hmac
-COMMON_SRC = test_main.c
include ../../common/Makefile
|
[-]
[+]
|
Added |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/test/libfoil/test_kdf/Makefile
^
|
@@ -0,0 +1,5 @@
+# -*- Mode: makefile-gmake -*-
+
+EXE = test_kdf
+
+include ../../common/Makefile
|
[-]
[+]
|
Added |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/test/libfoil/test_kdf/test_kdf.c
^
|
@@ -0,0 +1,235 @@
+/*
+ * Copyright (C) 2022 by Slava Monich
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the names of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation
+ * are those of the authors and should not be interpreted as representing
+ * any official policies, either expressed or implied.
+ */
+
+#include "test_common.h"
+
+#include "foil_kdf.h"
+#include "foil_digest.h"
+#include "foil_random.h"
+
+typedef struct test_kdf {
+ const char* name;
+ GType (*digest_type)(void);
+ const char* pw;
+ gssize pwlen;
+ FoilBytes salt;
+ guint iter;
+ guint dlen;
+ FoilBytes output;
+} TestKdf;
+
+static
+void
+test_null(
+ void)
+{
+ FoilBytes salt;
+
+ salt.val = (void*)&salt;
+ salt.len = sizeof(salt);
+ g_assert(!foil_kdf_pbkdf2((GType)0, NULL, 0, NULL, 0, 0));
+ /* Not a digest type: */
+ g_assert(!foil_kdf_pbkdf2(FOIL_RANDOM_DEFAULT, NULL, 0, &salt, 1, 0));
+ /* No iterations */
+ g_assert(!foil_kdf_pbkdf2(FOIL_DIGEST_SHA1, NULL, 0, &salt, 0, 0));
+ /* NULL password */
+ g_assert(!foil_kdf_pbkdf2(FOIL_DIGEST_SHA1, NULL, -1, &salt, 1, 0));
+}
+
+static
+void
+test_kdf(
+ gconstpointer param)
+{
+ const TestKdf* test = param;
+ GBytes* result = foil_kdf_pbkdf2(test->digest_type(), test->pw,
+ test->pwlen, &test->salt, test->iter, test->dlen);
+ gsize size = 0;
+ gconstpointer data;
+
+ g_assert(result);
+ data = g_bytes_get_data(result, &size);
+
+ g_assert_cmpuint(size, == ,test->output.len);
+ g_assert(!memcmp(data, test->output.val, size));
+ g_bytes_unref(result);
+}
+
+/* Test descriptors */
+
+#define TEST_(name) "/kdf/" name
+
+/*
+ * RFC 6070
+ * PKCS #5: Password-Based Key Derivation Function 2 (PBKDF2) Test Vectors
+ */
+
+static guint8 rfc6070_001_output[] = {
+ 0x0c, 0x60, 0xc8, 0x0f, 0x96, 0x1f, 0x0e, 0x71,
+ 0xf3, 0xa9, 0xb5, 0x24, 0xaf, 0x60, 0x12, 0x06,
+ 0x2f, 0xe0, 0x37, 0xa6
+};
+
+static guint8 rfc6070_002_output[] = {
+ 0xea, 0x6c, 0x01, 0x4d, 0xc7, 0x2d, 0x6f, 0x8c,
+ 0xcd, 0x1e, 0xd9, 0x2a, 0xce, 0x1d, 0x41, 0xf0,
+ 0xd8, 0xde, 0x89, 0x57
+};
+
+static guint8 rfc6070_003_output[] = {
+ 0x4b, 0x00, 0x79, 0x01, 0xb7, 0x65, 0x48, 0x9a,
+ 0xbe, 0xad, 0x49, 0xd9, 0x26, 0xf7, 0x21, 0xd0,
+ 0x65, 0xa4, 0x29, 0xc1
+};
+
+#ifdef TEST_16777216
+/* This one takes too long to run it on every build (although it succeeds) */
+static guint8 rfc6070_004_output[] = {
+ 0xee, 0xfe, 0x3d, 0x61, 0xcd, 0x4d, 0xa4, 0xe4,
+ 0xe9, 0x94, 0x5b, 0x3d, 0x6b, 0xa2, 0x15, 0x8c,
+ 0x26, 0x34, 0xe9, 0x84
+};
+#endif
+
+static guint8 rfc6070_005_output[] = {
+ 0x3d, 0x2e, 0xec, 0x4f, 0xe4, 0x1c, 0x84, 0x9b,
+ 0x80, 0xc8, 0xd8, 0x36, 0x62, 0xc0, 0xe4, 0x4a,
+ 0x8b, 0x29, 0x1a, 0x96, 0x4c, 0xf2, 0xf0, 0x70,
+ 0x38
+};
+
+static guint8 rfc6070_006_output[] = {
+ 0x56, 0xfa, 0x6a, 0xa7, 0x55, 0x48, 0x09, 0x9d,
+ 0xcc, 0x37, 0xd7, 0xf0, 0x34, 0x25, 0xe0, 0xc3
+};
+
+static guint8 collision_salt[] = {
+ 0xa0, 0x09, 0xc1, 0xa4, 0x85, 0x91, 0x2c, 0x6a,
+ 0xe6, 0x30, 0xd3, 0xe7, 0x44, 0x24, 0x0b, 0x04
+};
+
+static guint8 collision_output[] = {
+ 0x17, 0xeb, 0x40, 0x14, 0xc8, 0xc4, 0x61, 0xc3,
+ 0x00, 0xe9, 0xb6, 0x15, 0x18, 0xb9, 0xa1, 0x8b
+};
+
+static const TestKdf tests[] = {
+ {
+ TEST_("RFC6070/001"),
+ foil_impl_digest_sha1_get_type,
+ "password", 8,
+ { (const guint8*) "salt", 4 },
+ 1,
+ 20,
+ { TEST_ARRAY_AND_SIZE(rfc6070_001_output) }
+ },{
+ TEST_("RFC6070/002"),
+ foil_impl_digest_sha1_get_type,
+ "password", -1, /* Do strlen() on the password */
+ { (const guint8*) "salt", 4 },
+ 2,
+ 0, /* Use the default (digest size) */
+ { TEST_ARRAY_AND_SIZE(rfc6070_002_output) }
+ },{
+ TEST_("RFC6070/003"),
+ foil_impl_digest_sha1_get_type,
+ "password", 8,
+ { (const guint8*) "salt", 4 },
+ 4096,
+ 20,
+ { TEST_ARRAY_AND_SIZE(rfc6070_003_output) }
+#ifdef TEST_16777216
+ },{ /* This one takes too long to run it on every build */
+ TEST_("RFC6070/004"),
+ foil_impl_digest_sha1_get_type,
+ "password", 8,
+ { (const guint8*) "salt", 4 },
+ 16777216,
+ 20,
+ { TEST_ARRAY_AND_SIZE(rfc6070_004_output) }
+#endif
+ },{
+ TEST_("RFC6070/005"),
+ foil_impl_digest_sha1_get_type,
+ "passwordPASSWORDpassword", 24,
+ { (const guint8*) "saltSALTsaltSALTsaltSALTsaltSALTsalt", 36 },
+ 4096,
+ 25,
+ { TEST_ARRAY_AND_SIZE(rfc6070_005_output) }
+ },{
+ TEST_("RFC6070/006"),
+ foil_impl_digest_sha1_get_type,
+ "pass\0word", 9,
+ { (const guint8*) "sa\0lt", 5 },
+ 4096,
+ 16,
+ { TEST_ARRAY_AND_SIZE(rfc6070_006_output) }
+ },{ /* Collision example from Wikipedia */
+ TEST_("collision/1"),
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/test/libfoil/test_key_aes/Makefile
^
|
@@ -1,6 +1,5 @@
# -*- Mode: makefile-gmake -*-
EXE = test_key_aes
-COMMON_SRC = test_main.c
include ../../common/Makefile
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/test/libfoil/test_key_des/Makefile
^
|
@@ -1,6 +1,5 @@
# -*- Mode: makefile-gmake -*-
EXE = test_key_des
-COMMON_SRC = test_main.c
include ../../common/Makefile
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/test/libfoil/test_output/Makefile
^
|
@@ -1,6 +1,5 @@
# -*- Mode: makefile-gmake -*-
EXE = test_output
-COMMON_SRC = test_main.c
include ../../common/Makefile
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/tools/foilmsg/Makefile
^
|
@@ -35,23 +35,12 @@
RELEASE_BUILD_DIR = $(BUILD_DIR)/release
#
-# Application version
-#
-
-VERSION_FILE = ../../VERSION
-VERSION_MAJOR = $(shell head -1 $(VERSION_FILE) | cut -f1 -d.)
-VERSION_MINOR = $(shell head -1 $(VERSION_FILE) | cut -f2 -d.)
-VERSION_RELEASE = $(shell head -1 $(VERSION_FILE) | cut -f3 -d.)
-VERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_RELEASE)
-
-#
# Tools and flags
#
CC = $(CROSS_COMPILE)gcc
LD = $(CC)
WARNINGS = -Wall
-DEFINES += -DVERSION=$(VERSION)
INCLUDES = -I$(LIBFOIL_DIR)/include -I$(LIBFOILMSG_DIR)/include
BASE_FLAGS = -fPIC
BASE_LDFLAGS = $(BASE_FLAGS) $(LDFLAGS)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/tools/foilmsg/foilmsg.c
^
|
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2016-2021 by Slava Monich
+ * Copyright (C) 2016-2022 by Slava Monich
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -386,7 +386,7 @@
gboolean show_info = FALSE;
gboolean for_self = FALSE;
gboolean binary = FALSE;
-#ifdef VERSION
+#ifdef FOIL_VERSION_STRING
gboolean print_version = FALSE;
#endif
GError* error = NULL;
@@ -418,7 +418,7 @@
"Write output to FILE", "FILE" },
{ "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose,
"Enable verbose output", NULL },
-#ifdef VERSION
+#ifdef FOIL_VERSION_STRING
{ "version", 0, 0, G_OPTION_ARG_NONE, &print_version,
"Print version and exit", NULL },
#endif
@@ -500,9 +500,9 @@
decrypt = TRUE;
}
-#ifdef VERSION
+#ifdef FOIL_VERSION_STRING
if (ok && print_version) {
- printf("%s %s\n", gutil_log_default.name, G_STRINGIFY(VERSION));
+ printf("%s %s\n", gutil_log_default.name, FOIL_VERSION_STRING);
ret = RET_OK;
} else
#endif
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/tools/foilpng/Makefile
^
|
@@ -35,23 +35,12 @@
RELEASE_BUILD_DIR = $(BUILD_DIR)/release
#
-# Application version
-#
-
-VERSION_FILE = ../../VERSION
-VERSION_MAJOR = $(shell head -1 $(VERSION_FILE) | cut -f1 -d.)
-VERSION_MINOR = $(shell head -1 $(VERSION_FILE) | cut -f2 -d.)
-VERSION_RELEASE = $(shell head -1 $(VERSION_FILE) | cut -f3 -d.)
-VERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_RELEASE)
-
-#
# Tools and flags
#
CC = $(CROSS_COMPILE)gcc
LD = $(CC)
WARNINGS = -Wall
-DEFINES += -DVERSION=$(VERSION)
INCLUDES = -I$(LIBFOIL_DIR)/include -I$(LIBFOILMSG_DIR)/include
BASE_FLAGS = -fPIC
BASE_LDFLAGS = $(BASE_FLAGS) $(LDFLAGS)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/foil/tools/foilpng/foilpng.c
^
|
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2017-2021 by Slava Monich
+ * Copyright (C) 2017-2022 by Slava Monich
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -399,7 +399,7 @@
gboolean verbose = FALSE;
gboolean decrypt = FALSE;
gboolean for_self = FALSE;
-#ifdef VERSION
+#ifdef FOIL_VERSION_STRING
gboolean print_version = FALSE;
#endif
GError* error = NULL;
@@ -422,7 +422,7 @@
"Public key of the other party", "FILE" },
{ "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose,
"Enable verbose output", NULL },
-#ifdef VERSION
+#ifdef FOIL_VERSION_STRING
{ "version", 0, 0, G_OPTION_ARG_NONE, &print_version,
"Print version and exit", NULL },
#endif
@@ -488,9 +488,9 @@
ok = FALSE;
}
-#ifdef VERSION
+#ifdef FOIL_VERSION_STRING
if (ok && print_version) {
- printf("%s %s\n", gutil_log_default.name, G_STRINGIFY(VERSION));
+ printf("%s %s\n", gutil_log_default.name, FOIL_VERSION_STRING);
ret = RET_OK;
} else
#endif
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/libglibutil/LICENSE
^
|
@@ -1,4 +1,4 @@
-Copyright (C) 2014-2021 Jolla Ltd.
+Copyright (C) 2014-2022 Jolla Ltd.
You may use this file under the terms of BSD license as follows:
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/libglibutil/Makefile
^
|
@@ -20,7 +20,7 @@
VERSION_MAJOR = 1
VERSION_MINOR = 0
-VERSION_RELEASE = 56
+VERSION_RELEASE = 64
# Version for pkg-config
PCVERSION = $(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_RELEASE)
@@ -152,7 +152,7 @@
@echo $(COVERAGE_STATIC_LIB)
clean:
- $(MAKE) -C test clean
+ make -C test clean
rm -fr test/coverage/results test/coverage/*.gcov
rm -f *~ $(SRC_DIR)/*~ $(INCLUDE_DIR)/*~
rm -fr $(BUILD_DIR) RPMS installroot
@@ -162,7 +162,7 @@
rm -fr debian/*.install
test:
- $(MAKE) -C test test
+ make -C test test
$(BUILD_DIR):
mkdir -p $@
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/libglibutil/debian/changelog
^
|
@@ -1,3 +1,48 @@
+libglibutil (1.0.64) unstable; urgency=low
+
+ * Resolved a mysterious parallel build issue
+
+ -- Slava Monich <slava.monich@jolla.com> Tue, 17 May 2022 03:56:50 +0300
+
+libglibutil (1.0.63) unstable; urgency=low
+
+ * Added gutil_bytes_has_prefix()
+ * Added gutil_bytes_has_suffix()
+
+ -- Slava Monich <slava.monich@jolla.com> Sat, 23 Apr 2022 21:24:25 +0300
+
+libglibutil (1.0.62) unstable; urgency=low
+
+ * Added gutil_strlen0()
+ * Added gutil_strv_find_last()
+ * Added gutil_strv_remove_dups()
+
+ -- Slava Monich <slava.monich@jolla.com> Sun, 13 Mar 2022 21:59:26 +0200
+
+libglibutil (1.0.61) unstable; urgency=low
+
+ * Added gutil_strv_remove()
+
+ -- Slava Monich <slava.monich@jolla.com> Thu, 25 Nov 2021 18:31:18 +0200
+
+libglibutil (1.0.60) unstable; urgency=low
+
+ * Housekeeping release
+
+ -- Slava Monich <slava.monich@jolla.com> Mon, 22 Nov 2021 23:37:14 +0200
+
+libglibutil (1.0.58) unstable; urgency=low
+
+ * Don't check upper bound when setting log level from the envvironment
+
+ -- Slava Monich <slava.monich@jolla.com> Wed, 17 Nov 2021 13:17:45 +0200
+
+libglibutil (1.0.57) unstable; urgency=low
+
+ * Fixed unit tests for older 32-bit systems
+
+ -- Slava Monich <slava.monich@jolla.com> Mon, 08 Nov 2021 02:28:37 +0200
+
libglibutil (1.0.56) unstable; urgency=low
* Added gutil_parse_int64()
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/libglibutil/debian/copyright
^
|
@@ -1,4 +1,4 @@
-Copyright (C) 2014-2021 Jolla Ltd.
+Copyright (C) 2014-2022 Jolla Ltd.
You may use this file under the terms of BSD license as follows:
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/libglibutil/include/gutil_misc.h
^
|
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2016-2021 Jolla Ltd.
- * Copyright (C) 2016-2021 Slava Monich <slava.monich@jolla.com>
+ * Copyright (C) 2016-2022 Jolla Ltd.
+ * Copyright (C) 2016-2022 Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of BSD license as follows:
*
@@ -135,6 +135,18 @@
GBytes* bytes,
const GUtilData* data); /* Since 1.0.41 */
+gboolean
+gutil_bytes_has_prefix(
+ GBytes* bytes,
+ const void* data,
+ gsize size); /* Since 1.0.63 */
+
+gboolean
+gutil_bytes_has_suffix(
+ GBytes* bytes,
+ const void* data,
+ gsize size); /* Since 1.0.63 */
+
gsize
gutil_ptrv_length(
const void* ptrv); /* Since 1.0.50 */
@@ -149,6 +161,10 @@
gsize size); /* Since 1.0.52 */
gsize
+gutil_strlen0(
+ const char* str); /* Since 1.0.62 */
+
+gsize
gutil_range_init_with_bytes(
GUtilRange* range,
GBytes* bytes); /* Since 1.0.55 */
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/libglibutil/include/gutil_strv.h
^
|
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2014-2020 Jolla Ltd.
- * Copyright (C) 2014-2020 Slava Monich <slava.monich@jolla.com>
+ * Copyright (C) 2014-2022 Jolla Ltd.
+ * Copyright (C) 2014-2022 Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of BSD license as follows:
*
@@ -69,6 +69,15 @@
const char* s);
/**
+ * Returns index of the last occurrence of specified string in the string
+ * array, or -1 if the string is not found.
+ */
+int
+gutil_strv_find_last(
+ const GStrV* sv,
+ const char* s); /* Since 1.0.62 */
+
+/**
* Checks if string array contains the specified string.
*/
gboolean
@@ -107,6 +116,19 @@
G_GNUC_WARN_UNUSED_RESULT;
/**
+ * Removes one or all matching strings from the array and frees them.
+ */
+GStrV*
+gutil_strv_remove(
+ GStrV* sv,
+ const char* s,
+ gboolean remove_all) /* Since 1.0.61 */
+ G_GNUC_WARN_UNUSED_RESULT;
+
+#define gutil_strv_remove_one(sv, s) gutil_strv_remove(sv, s, FALSE)
+#define gutil_strv_remove_all(sv, s) gutil_strv_remove(sv, s, TRUE)
+
+/**
* Checks two string arrays for equality.
*/
gboolean
@@ -115,6 +137,13 @@
const GStrV* sv2);
/**
+ * Removes all duplicates from the string array.
+ */
+GStrV*
+gutil_strv_remove_dups(
+ GStrV* sv); /* Since 1.0.62 */
+
+/**
* Sorts the string array
*/
GStrV*
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/libglibutil/rpm/libglibutil.spec
^
|
@@ -1,6 +1,6 @@
Name: libglibutil
-Version: 1.0.56
+Version: 1.0.64
Release: 0
Summary: Library of glib utilities
License: BSD
@@ -9,6 +9,11 @@
BuildRequires: pkgconfig
BuildRequires: pkgconfig(glib-2.0)
+
+# license macro requires rpm >= 4.11
+BuildRequires: pkgconfig(rpm)
+%define license_support %(pkg-config --exists 'rpm >= 4.11'; echo $?)
+
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
@@ -33,7 +38,7 @@
make LIBDIR=%{_libdir} DESTDIR=%{buildroot} install-dev
%check
-make %{_smp_mflags} -C test test
+make -C test test
%post -p /sbin/ldconfig
@@ -42,6 +47,9 @@
%files
%defattr(-,root,root,-)
%{_libdir}/%{name}.so.*
+%if %{license_support} == 0
+%license LICENSE
+%endif
%files devel
%defattr(-,root,root,-)
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/libglibutil/src/gutil_log.c
^
|
@@ -14,8 +14,8 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the names of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -676,7 +676,7 @@
int val = 0;
if (gutil_parse_int(getenv("GUTIL_LOG_DEFAULT_LEVEL"), 0, &val) &&
- val >= GLOG_LEVEL_INHERIT && val <= GLOG_LEVEL_VERBOSE) {
+ val >= GLOG_LEVEL_INHERIT) {
gutil_log_default.level = val;
GDEBUG("Default log level %d", val);
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/libglibutil/src/gutil_misc.c
^
|
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2016-2021 Jolla Ltd.
- * Copyright (C) 2016-2021 Slava Monich <slava.monich@jolla.com>
+ * Copyright (C) 2016-2022 Jolla Ltd.
+ * Copyright (C) 2016-2022 Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of BSD license as follows:
*
@@ -511,6 +511,52 @@
}
}
+gboolean
+gutil_bytes_has_prefix(
+ GBytes* bytes,
+ const void* data,
+ gsize size) /* Since 1.0.63 */
+{
+ if (!bytes) {
+ /* NULL GBytes has neither prefix nor suffix, even an empty one */
+ return FALSE;
+ } else if (!size) {
+ /*
+ * That's largely a philosophical question - can anything have
+ * an empty prefix? Let's assume that the answer is yes. And
+ * then if anything can have such a prefix, everything has it.
+ * Right? Except for NULL GBytes which doesn't have anything
+ * as said earlier.
+ */
+ return TRUE;
+ } else {
+ gsize bytes_size;
+ const guint8* contents = g_bytes_get_data(bytes, &bytes_size);
+
+ return (bytes_size >= size) && !memcmp(contents, data, size);
+ }
+}
+
+gboolean
+gutil_bytes_has_suffix(
+ GBytes* bytes,
+ const void* data,
+ gsize size) /* Since 1.0.63 */
+{
+ /* Treat an empty suffix the same way as an empty prefix */
+ if (!bytes) {
+ return FALSE;
+ } else if (!size) {
+ return TRUE;
+ } else {
+ gsize bytes_size;
+ const guint8* contents = g_bytes_get_data(bytes, &bytes_size);
+
+ return (bytes_size >= size) &&
+ !memcmp(contents + (bytes_size - size), data, size);
+ }
+}
+
/* Calculates the length of NULL-terminated array of pointers */
gsize
gutil_ptrv_length(
@@ -556,6 +602,14 @@
}
}
+/* NULL-tolerant version of strlen */
+gsize
+gutil_strlen0(
+ const char* str) /* Since 1.0.62 */
+{
+ return str ? strlen(str) : 0;
+}
+
gsize
gutil_range_init_with_bytes(
GUtilRange* range,
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/libglibutil/src/gutil_strv.c
^
|
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2014-2021 Jolla Ltd.
- * Copyright (C) 2014-2021 Slava Monich <slava.monich@jolla.com>
+ * Copyright (C) 2014-2022 Jolla Ltd.
+ * Copyright (C) 2014-2022 Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of BSD license as follows:
*
@@ -88,9 +88,10 @@
const GStrV* sv,
const char* s)
{
- if (sv && s) {
+ if (G_LIKELY(sv) && G_LIKELY(s)) {
int i = 0;
const GStrV* ptr;
+
for (ptr = sv; *ptr; ptr++, i++) {
if (!strcmp(*ptr, s)) {
return i;
@@ -100,6 +101,36 @@
return -1;
}
+/* Helper for gutil_strv_find_last and friends */
+static
+int
+gutil_strv_find_last_impl(
+ const GStrV* sv,
+ const char* s,
+ int i /* exclisive */)
+{
+ while (i > 0) {
+ if (!strcmp(sv[--i], s)) {
+ return i;
+ }
+ }
+ return -1;
+}
+
+/**
+ * Returns index of the last occurrence of specified string in the string
+ * array, or -1 if the string is not found.
+ */
+int
+gutil_strv_find_last(
+ const GStrV* sv,
+ const char* s) /* Since 1.0.62 */
+{
+ /* NULL sv is handled by gutil_strv_length() */
+ return G_LIKELY(s) ? gutil_strv_find_last_impl(sv, s,
+ gutil_strv_length(sv)) : -1;
+}
+
/**
* Checks if string array contains the specified string.
*/
@@ -158,6 +189,22 @@
return sv;
}
+/* Internal helper for removal functions */
+static
+GStrV*
+gutil_strv_remove_impl(
+ GStrV* sv,
+ guint pos,
+ guint len,
+ gboolean free_string)
+{
+ if (free_string) {
+ g_free(sv[pos]);
+ }
+ memmove(sv + pos, sv + pos + 1, sizeof(char*)*(len - pos));
+ return g_realloc(sv, sizeof(char*)*len);
+}
+
/**
* Removes the string from the specified position in the array.
*/
@@ -169,12 +216,66 @@
{
if (G_LIKELY(sv) && G_LIKELY(pos >= 0)) {
const int len = gutil_strv_length(sv);
+
if (pos < len) {
- if (free_string) {
- g_free(sv[pos]);
+ sv = gutil_strv_remove_impl(sv, pos, len, free_string);
+ }
+ }
+ return sv;
+}
+
+/**
+ * Removes one or all matching strings from the array and frees them.
+ */
+GStrV*
+gutil_strv_remove(
+ GStrV* sv,
+ const char* s,
+ gboolean remove_all)
+{
+ if (G_LIKELY(sv) && G_LIKELY(s)) {
+ const int pos = gutil_strv_find(sv, s);
+
+ if (pos >= 0) {
+ guint len = gutil_strv_length(sv);
+
+ sv = gutil_strv_remove_impl(sv, pos, len, TRUE);
+ if (remove_all) {
+ int i, l;
+
+ len--;
+ l = len - pos;
+ while ((i = gutil_strv_find_last_impl(sv + pos, s, l)) >= 0) {
+ sv = gutil_strv_remove_impl(sv, pos + i, len--, TRUE);
+ l = i;
+ }
+ }
+ }
+ }
+ return sv;
+}
+
+/**
+ * Removes all duplicates from the string array.
+ */
+GStrV*
+gutil_strv_remove_dups(
+ GStrV* sv) /* Since 1.0.62 */
+{
+ if (G_LIKELY(sv)) {
+ guint len = gutil_strv_length(sv), pos = 0, l = len;
+
+ while (pos < len) {
+ int i = gutil_strv_find_last_impl(sv + pos + 1, sv[pos], l - 1);
+
+ if (i < 0) {
+ /* Done with this string, switch to the next one */
+ pos++;
+ l = len - pos;
+ } else {
+ sv = gutil_strv_remove_impl(sv, pos + 1 + i, len--, TRUE);
+ l = i + 1;
}
- memmove(sv + pos, sv + pos + 1, sizeof(char*)*(len - pos));
- sv = g_realloc(sv, sizeof(char*)*len);
}
}
return sv;
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/libglibutil/test/common/test_common.h
^
|
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2016-2018 Jolla Ltd.
- * Copyright (C) 2016-2018 Slava Monich <slava.monich@jolla.com>
+ * Copyright (C) 2016-2022 Jolla Ltd.
+ * Copyright (C) 2016-2022 Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of BSD license as follows:
*
@@ -14,8 +14,8 @@
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the names of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -58,6 +58,7 @@
/* Macros */
#define TEST_INIT_DATA(a,b) ((a).bytes = (void*)(b), (a).size = sizeof(b))
+#define TEST_ARRAY_AND_SIZE(a) (a), sizeof(a)
#endif /* TEST_COMMON_H */
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/libglibutil/test/test_misc/test_misc.c
^
|
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2016-2021 Jolla Ltd.
- * Copyright (C) 2016-2021 Slava Monich <slava.monich@jolla.com>
+ * Copyright (C) 2016-2022 Jolla Ltd.
+ * Copyright (C) 2016-2022 Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of BSD license as follows:
*
@@ -224,7 +224,7 @@
g_assert(!gutil_parse_uint("-1", 0, &value));
g_assert(!gutil_parse_uint(" -1 ", 0, &value));
g_assert(gutil_parse_uint("4294967295", 0, &value));
- g_assert_cmpuint(value, == ,4294967295);
+ g_assert_cmpuint(value, == ,4294967295U);
g_assert(gutil_parse_uint(" 0x7fffffff ", 0, &value));
g_assert_cmpuint(value, == ,0x7fffffff);
g_assert(gutil_parse_uint(" 7fffffff ", 16, &value));
@@ -260,9 +260,9 @@
g_assert(gutil_parse_int64("42", 0, &value));
g_assert_cmpint(value, == ,42);
g_assert(gutil_parse_int64("-2147483649", 0, &value));
- g_assert_cmpint(value, == ,-2147483649);
+ g_assert_cmpint(value, == ,G_GINT64_CONSTANT(-2147483649));
g_assert(gutil_parse_int64("4294967295", 0, &value));
- g_assert_cmpint(value, == ,4294967295);
+ g_assert_cmpint(value, == ,G_GINT64_CONSTANT(4294967295));
g_assert(gutil_parse_int64(" 0x7fffffff ", 0, &value));
g_assert_cmpint(value, == ,0x7fffffff);
g_assert(gutil_parse_int64(" 7fffffff ", 16, &value));
@@ -271,13 +271,15 @@
g_assert_cmpint(value, == ,0x7ffffffe);
g_assert(gutil_parse_int64("0xffffffff", 0, &value));
g_assert_cmpint(value, == ,0xffffffff);
- g_assert(!gutil_parse_int64("0x10000000000000000", 0, &value));
- g_assert(!gutil_parse_int64("-9223372036854775809", 0, &value));
g_assert(gutil_parse_int64("-9223372036854775808", 0, &value));
g_assert_cmpint(value, == ,0x8000000000000000);
- g_assert(!gutil_parse_int64("9223372036854775808", 0, &value));
g_assert(gutil_parse_int64("9223372036854775807", 0, &value));
g_assert_cmpint(value, == ,0x7fffffffffffffff);
+#ifndef _WIN32
+ g_assert(!gutil_parse_int64("0x10000000000000000", 0, &value));
+ g_assert(!gutil_parse_int64("-9223372036854775809", 0, &value));
+ g_assert(!gutil_parse_int64("9223372036854775808", 0, &value));
+#endif
}
/*==========================================================================*
@@ -302,12 +304,11 @@
g_assert_cmpuint(value, == ,0);
g_assert(gutil_parse_uint64("42", 0, &value));
g_assert_cmpuint(value, == ,42);
- g_assert(!gutil_parse_uint64("0x10000000000000000", 0, &value));
g_assert(!gutil_parse_uint64("-2147483649", 0, &value));
g_assert(!gutil_parse_uint64("-1", 0, &value));
g_assert(!gutil_parse_uint64(" -1 ", 0, &value));
g_assert(gutil_parse_uint64("4294967295", 0, &value));
- g_assert_cmpuint(value, == ,4294967295);
+ g_assert_cmpuint(value, == ,4294967295U);
g_assert(!gutil_parse_uint64(" 0x7fffffff ffffffff ", 0, &value));
g_assert(gutil_parse_uint64(" 0x7fffffffffffffff ", 0, &value));
g_assert_cmpuint(value, == ,0x7fffffffffffffff);
@@ -318,6 +319,9 @@
g_assert_cmpuint(value, == ,0x100000000);
g_assert(gutil_parse_uint64("0xffffffffffffffff", 0, &value));
g_assert_cmpuint(value, == ,0xffffffffffffffff);
+#ifndef _WIN32
+ g_assert(!gutil_parse_uint64("0x10000000000000000", 0, &value));
+#endif
}
/*==========================================================================*
@@ -675,6 +679,20 @@
}
/*==========================================================================*
+ * strlen
+ *==========================================================================*/
+
+static
+void
+test_strlen(
+ void)
+{
+ g_assert(!gutil_strlen0(NULL));
+ g_assert_cmpuint(gutil_strlen0(""), == ,0);
+ g_assert_cmpuint(gutil_strlen0("1"), == ,1);
+}
+
+/*==========================================================================*
* range_init
*==========================================================================*/
@@ -751,6 +769,64 @@
}
/*==========================================================================*
+ * bytes_prefix
+ *==========================================================================*/
+
+static
+void
+test_bytes_prefix(
+ void)
+{
+ static const guint8 data[] = { 0x01, 0x02, 0x03, 0x04 };
+ static const guint8 prefix[] = { 0x01, 0x02 };
+ static const guint8 not_prefix[] = { 0x03, 0x04 };
+ static const guint8 too_long[] = { 0x01, 0x02, 0x03, 0x04, 0x05 };
+ GBytes* empty = g_bytes_new_static(NULL, 0);
+ GBytes* bytes = g_bytes_new_static(TEST_ARRAY_AND_SIZE(data));
+
+ /* NULL GBytes doesn't have any prefix, even an empty one */
+ g_assert(!gutil_bytes_has_prefix(NULL, NULL, 0));
+
+ /* Anything has an empty prefix */
+ g_assert(gutil_bytes_has_prefix(empty, NULL, 0));
+ g_assert(gutil_bytes_has_prefix(bytes, prefix, 0));
+
+ /* Test the matching */
+ g_assert(gutil_bytes_has_prefix(bytes, TEST_ARRAY_AND_SIZE(prefix)));
+ g_assert(!gutil_bytes_has_prefix(bytes, TEST_ARRAY_AND_SIZE(not_prefix)));
+ g_assert(!gutil_bytes_has_prefix(bytes, TEST_ARRAY_AND_SIZE(too_long)));
+}
+
+/*==========================================================================*
+ * bytes_suffix
+ *==========================================================================*/
+
+static
+void
+test_bytes_suffix(
+ void)
+{
+ static const guint8 data[] = { 0x01, 0x02, 0x03, 0x04 };
+ static const guint8 suffix[] = { 0x03, 0x04 };
+ static const guint8 not_suffix[] = { 0x02, 0x03 };
+ static const guint8 too_long[] = { 0x01, 0x02, 0x03, 0x04, 0x05 };
+ GBytes* empty = g_bytes_new_static(NULL, 0);
+ GBytes* bytes = g_bytes_new_static(TEST_ARRAY_AND_SIZE(data));
+
+ /* NULL GBytes doesn't have any suffix, even an empty one */
+ g_assert(!gutil_bytes_has_suffix(NULL, NULL, 0));
+
+ /* Anything has an empty suffix */
+ g_assert(gutil_bytes_has_suffix(empty, NULL, 0));
+ g_assert(gutil_bytes_has_suffix(bytes, suffix, 0));
+
+ /* Test the matching */
+ g_assert(gutil_bytes_has_suffix(bytes, TEST_ARRAY_AND_SIZE(suffix)));
+ g_assert(!gutil_bytes_has_suffix(bytes, TEST_ARRAY_AND_SIZE(not_suffix)));
+ g_assert(!gutil_bytes_has_suffix(bytes, TEST_ARRAY_AND_SIZE(too_long)));
+}
+
+/*==========================================================================*
* Common
*==========================================================================*/
@@ -785,8 +861,11 @@
g_test_add_func(TEST_("ptrv_lenght"), test_ptrv_length);
g_test_add_func(TEST_("ptrv_free"), test_ptrv_free);
g_test_add_func(TEST_("memdup"), test_memdup);
+ g_test_add_func(TEST_("strlen"), test_strlen);
g_test_add_func(TEST_("range_init"), test_range_init);
g_test_add_func(TEST_("range_prefix"), test_range_prefix);
+ g_test_add_func(TEST_("bytes_prefix"), test_bytes_prefix);
+ g_test_add_func(TEST_("bytes_suffix"), test_bytes_suffix);
test_init(&test_opt, argc, argv);
return g_test_run();
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/libglibutil/test/test_strv/test_strv.c
^
|
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2015-2020 Jolla Ltd.
- * Copyright (C) 2015-2020 Slava Monich <slava.monich@jolla.com>
+ * Copyright (C) 2015-2022 Jolla Ltd.
+ * Copyright (C) 2015-2022 Slava Monich <slava.monich@jolla.com>
*
* You may use this file under the terms of BSD license as follows:
*
@@ -163,7 +163,12 @@
g_assert(gutil_strv_contains(sv, "b"));
g_assert(gutil_strv_contains(sv, "c"));
g_assert(!gutil_strv_contains(sv, "d"));
- g_assert(gutil_strv_find(sv, "b") == 1);
+ g_assert_cmpint(gutil_strv_find(sv, "b"), == ,1);
+ g_assert_cmpint(gutil_strv_find_last(sv, "a"), == ,0);
+ g_assert_cmpint(gutil_strv_find_last(sv, "b"), == ,2);
+ g_assert_cmpint(gutil_strv_find_last(sv, "c"), == ,3);
+ g_assert_cmpint(gutil_strv_find_last(sv, "d"), == ,-1);
+ g_assert_cmpint(gutil_strv_find_last(NULL, NULL), == ,-1);
g_assert(!gutil_strv_contains(sv, NULL));
g_assert(!gutil_strv_contains(NULL, "a"));
g_assert(!gutil_strv_contains(NULL, NULL));
@@ -179,6 +184,37 @@
test_remove(
void)
{
+ guint orig_len = 8;
+ char** sv = g_strsplit("a,b,c,b,c,c,d,b", ",", 0); /* 8 elements */
+ char** sv1 = g_strsplit("a,b,b,c,c,d,b", ",", 0); /* Minus one c */
+ char** sv2 = g_strsplit("a,c,c,d", ",", 0); /* Minus all b's */
+ char** sv3 = g_strsplit("a,c,c", ",", 0); /* Minus all (actually one) d */
+
+ g_assert(!gutil_strv_remove_all(NULL, NULL));
+ g_assert(gutil_strv_remove_all(sv, NULL) == sv);
+ g_assert_cmpuint(gutil_strv_length(sv), == ,orig_len);
+
+ g_assert(sv == gutil_strv_remove_all(sv, "e")); /* "e" is not there */
+ g_assert_cmpuint(gutil_strv_length(sv), == ,orig_len);
+ g_assert(gutil_strv_equal(sv = gutil_strv_remove_one(sv, "c"), sv1));
+ g_assert(gutil_strv_equal(sv = gutil_strv_remove_all(sv, "b"), sv2));
+ g_assert(gutil_strv_equal(sv = gutil_strv_remove_all(sv, "d"), sv3));
+
+ g_strfreev(sv);
+ g_strfreev(sv1);
+ g_strfreev(sv2);
+ g_strfreev(sv3);
+}
+
+/*==========================================================================*
+ * RemoveAt
+ *==========================================================================*/
+
+static
+void
+test_remove_at(
+ void)
+{
char** sv = g_strsplit("a,b,c", ",", 0);
char* c = sv[2];
@@ -198,6 +234,27 @@
}
/*==========================================================================*
+ * RemoveDups
+ *==========================================================================*/
+
+static
+void
+test_remove_dups(
+ void)
+{
+ char** sv = g_strsplit("a,b,c,b,c,c,d,b", ",", 0); /* 8 elements */
+ char** sv1 = g_strsplit("a,b,c,d", ",", 0); /* No dups */
+
+ g_assert(!gutil_strv_remove_dups(NULL));
+ g_assert(gutil_strv_equal(sv = gutil_strv_remove_dups(sv), sv1));
+ g_assert(sv == gutil_strv_remove_dups(sv)); /* Nothing to realloc */
+ g_assert(gutil_strv_equal(sv, sv1)); /* Still equal */
+
+ g_strfreev(sv);
+ g_strfreev(sv1);
+}
+
+/*==========================================================================*
* Sort
*==========================================================================*/
@@ -280,6 +337,8 @@
g_test_add_func(TEST_PREFIX "equal", test_equal);
g_test_add_func(TEST_PREFIX "find", test_find);
g_test_add_func(TEST_PREFIX "remove", test_remove);
+ g_test_add_func(TEST_PREFIX "remove_at", test_remove_at);
+ g_test_add_func(TEST_PREFIX "remove_dups", test_remove_dups);
g_test_add_func(TEST_PREFIX "sort", test_sort);
g_test_add_func(TEST_PREFIX "bsearch", test_bsearch);
g_test_add_func(TEST_PREFIX "strip", test_strip);
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/qml/EditGroupPage.qml
^
|
@@ -79,7 +79,7 @@
onDoneEditing: {
editItem = null
if (editText.length > 1) {
- groupModel.renameGroupAt(index, editText)
+ model.groupName = editText
}
}
onYChanged: {
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/qml/EncryptedFullscreenPage.qml
^
|
@@ -51,6 +51,7 @@
})
details.titleChanged.connect(function(title) {
imageList.model.setTitleAt(currentIndex, title)
+ currentImageItem = model.get(currentIndex)
})
details.requestIndex.connect(function(index) {
// onCurrentIndexChanged won't emit requestIndex
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/qml/EncryptedGroup.qml
^
|
@@ -2,15 +2,19 @@
import Sailfish.Silica 1.0
import harbour.foilpics 1.0
+import "harbour"
+
Item {
- id: group
+ id: thisItem
+
height: grid.y + grid.height
+
readonly property real headerHeight: grid.y
readonly property bool headerVisible: (!isDefault || !isFirstGroup) && picsCount > 0
property var foilModel
property var flickable
- property alias title: groupHeader.text
+ property alias title: groupHeaderLabel.text
property alias picsModel: grid.model
property alias cellSize: grid.cellSize
property alias columnCount: grid.columnCount
@@ -22,22 +26,76 @@
property int modelIndex
property var selectionModel
property bool selectable
+ property bool expanded: true
+
+ property bool _constructed
signal decryptItem(int globalIndex)
signal deleteItem(int globalIndex)
signal requestIndex(int globalIndex)
+ signal toggleExpanded()
- SectionHeader {
+ Component.onCompleted: _constructed = true
+
+ BackgroundItem {
id: groupHeader
+
+ height: Theme.itemSizeSmall
visible: headerVisible
+ enabled: isInteractive
+
+ readonly property bool isInteractive: !selectable && !isDefault
+
+ Rectangle {
+ anchors.fill: parent
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: Theme.rgba(Theme.highlightBackgroundColor, 0.15) }
+ GradientStop { position: 1.0; color: "transparent" }
+ }
+ }
+
+ SectionHeader {
+ id: groupHeaderLabel
+
+ anchors {
+ left: parent.left
+ leftMargin: Theme.horizontalPageMargin
+ right: groupHeader.isInteractive ? arrow.left : parent.right
+ rightMargin: groupHeader.isInteractive ? Theme.paddingMedium : Theme.horizontalPageMargin
+ verticalCenter: parent.verticalCenter
+ }
+
+ // Label/SectionHeader didn't have "topPadding" in earlier versions of SFOS
+ Component.onCompleted: {
+ if ('topPadding' in groupHeaderLabel) {
+ groupHeaderLabel.topPadding = 0
+ }
+ }
+ }
+
+ HarbourHighlightIcon {
+ id: arrow
+
+ anchors {
+ right: parent.right
+ verticalCenter: parent.verticalCenter
+ rightMargin: Theme.paddingMedium
+ }
+ highlightColor: groupHeaderLabel.color
+ source: groupHeader.isInteractive ? "image://theme/icon-m-left" : ""
+ visible: groupHeader.isInteractive
+ }
+
+ onClicked: thisItem.toggleExpanded()
}
ImageGridView {
id: grid
+
y: headerVisible ? groupHeader.height : 0
width: parent.width
- height: contentHeight + expandHeight
contentHeight: grid.cellWidth * Math.floor((modelCount + columnCount - 1)/columnCount)
+ clip: true
readonly property int modelCount: model ? model.count : 0
property alias contextMenu: contextMenuItem
@@ -54,7 +112,7 @@
contentYOffset: index >= grid.minOffsetIndex ? grid.expandHeight : 0.0
z: isItemExpanded ? 1000 : 1
enabled: isItemExpanded || !grid.contextMenu.active
- selectionModel: group.selectionModel
+ selectionModel: thisItem.selectionModel
selectionKey: imageId
readonly property bool isItemExpanded: grid.expandItem === delegate
@@ -72,24 +130,25 @@
}
function decrypt() {
- group.decryptItem(picsModel.mapToSource(modelIndex))
+ thisItem.decryptItem(picsModel.mapToSource(modelIndex))
}
function remove() {
- group.deleteItem(picsModel.mapToSource(modelIndex))
+ thisItem.deleteItem(picsModel.mapToSource(modelIndex))
}
function editDetails() {
+ var model = grid.model
var modelIndex = index
var imageData = picsModel.get(modelIndex)
var page = pageStack.push(Qt.resolvedUrl("EncryptedDetailsPage.qml"), {
details: imageData,
- foilModel: group.foilModel
+ foilModel: thisItem.foilModel
})
page.titleChanged.connect(function(title) {
- grid.model.setTitleAt(modelIndex, title)
+ model.setTitleAt(modelIndex, title)
})
- page.requestIndex.connect(group.requestIndex)
+ page.requestIndex.connect(thisItem.requestIndex)
}
onClicked: {
@@ -102,10 +161,10 @@
model: foilModel
})
if (page) {
- group.requestIndex(sourceIndex)
- page.decryptItem.connect(group.decryptItem)
- page.deleteItem.connect(group.deleteItem)
- page.requestIndex.connect(group.requestIndex)
+ thisItem.requestIndex(sourceIndex)
+ page.decryptItem.connect(thisItem.decryptItem)
+ page.deleteItem.connect(thisItem.deleteItem)
+ page.requestIndex.connect(thisItem.requestIndex)
}
}
}
@@ -172,4 +231,46 @@
}
}
}
+
+ states: [
+ State {
+ when: expanded
+ PropertyChanges {
+ target: arrow
+ rotation: -90
+ }
+ PropertyChanges {
+ target: grid
+ height: grid.contentHeight + grid.expandHeight
+ }
+ },
+ State {
+ when: !expanded
+ PropertyChanges {
+ target: arrow
+ rotation: 0
+ }
+ PropertyChanges {
+ target: grid
+ height: 0
+ }
+ }
+ ]
+
+ transitions: Transition {
+ enabled: _constructed
+ to: "*"
+ NumberAnimation {
+ target: grid
+ duration: 200
+ easing.type: Easing.InOutQuad
+ property: "height"
+ }
+ NumberAnimation {
+ target: arrow
+ duration: 200
+ easing.type: Easing.InOutQuad
+ property: "rotation"
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/qml/EncryptedList.qml
^
|
@@ -119,6 +119,9 @@
modelIndex: model.index
selectionModel: view.selectionModel
selectable: view.selectable
+ expanded: groupExpanded
+
+ onToggleExpanded: groupExpanded = !groupExpanded
Connections {
target: view
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/qml/EncryptedPage.qml
^
|
@@ -21,6 +21,10 @@
(nextPage && parent && nextPage.parent !== parent.attachedContainer)
readonly property real screenHeight: isPortrait ? Screen.height : Screen.width
+ // Otherwise width is changing with a delay, which may cause weird layout
+ // adjustments when on-screen keyboard is visible
+ onIsLandscapeChanged: width = isLandscape ? Screen.height : Screen.width
+
function getFoilUi() {
if (!foilUi) {
foilUi = foilUiComponent.createObject(thisPage)
@@ -32,11 +36,6 @@
id: foilUiComponent
QtObject {
- readonly property real opacityFaint: 0.2
- readonly property real opacityLow: 0.4
- readonly property real opacityHigh: 0.6
- readonly property real opacityOverlay: 0.8
-
readonly property var settings: FoilPicsSettings
readonly property bool otherFoilAppsInstalled: FoilPics.otherFoilAppsInstalled
function isLockedState(foilState) {
@@ -247,7 +246,7 @@
Rectangle {
id: circle
- width: Theme.itemSizeHuge
+ width: isPortrait ? Theme.itemSizeHuge : Theme.itemSizeExtraLarge
height: width
color: Theme.rgba(Theme.primaryColor, 0.08)
radius: width/2
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/qml/GalleryFullscreenPage.qml
^
|
@@ -30,10 +30,10 @@
anchors.fill: parent
source: currentImageItem ? currentImageItem.url : ""
- model: TransferMethodsModel
+ model: HarbourTransferMethodsModel
Binding {
- target: TransferMethodsModel
+ target: HarbourTransferMethodsModel
property: "filter"
value: "image/*"
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/qml/main.qml
^
|
@@ -28,20 +28,22 @@
onTriggered: appFoilModel.lock(true);
}
- SystemState {
+ Connections {
+ target: HarbourSystemState
+
property bool wasDimmed
onDisplayStatusChanged: {
- if (displayStatus === MCE_DISPLAY_DIM) {
+ if (target.displayStatus === HarbourSystemState.MCE_DISPLAY_DIM) {
wasDimmed = true
- } else if (displayStatus === MCE_DISPLAY_ON) {
+ } else if (target.displayStatus === HarbourSystemState.MCE_DISPLAY_ON) {
wasDimmed = false
}
}
onLockedChanged: {
lockTimer.stop()
- if (locked) {
+ if (FoilPicsSettings.autoLock && target.locked) {
if (wasDimmed) {
// Give the user some time to wake wake up the screen
// and prevent encrypted pictures from being locked
@@ -52,6 +54,19 @@
}
}
}
+
+ Connections {
+ target: FoilPicsSettings
+
+ onAutoLockChanged: {
+ lockTimer.stop()
+ // It's so unlikely that settings change when the device is locked
+ // But it's possible!
+ if (target.autoLock && HarbourSystemState.locked) {
+ appFoilModel.lock(false);
+ }
+ }
+ }
//: Application title
//% "Foil Pics"
|
[-]
[+]
|
Added |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/settings/harbour-foilpics.json
^
|
@@ -0,0 +1,14 @@
+{
+ "translation_catalog" : "harbour-foilpics",
+ "entries": [
+ {
+ "path": "applications/harbour-foilpics.desktop",
+ "title": "Foil Pics",
+ "type": "page",
+ "icon": "harbour-foilpics",
+ "params": {
+ "source": "/usr/share/harbour-foilpics/qml/settings/settings.qml"
+ }
+ }
+ ]
+}
|
[-]
[+]
|
Added |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/settings/settings.qml
^
|
@@ -0,0 +1,65 @@
+import QtQuick 2.0
+import Sailfish.Silica 1.0
+import org.nemomobile.configuration 1.0
+
+Page {
+ readonly property string rootPath: "/apps/harbour-foilpics/"
+ property alias title: pageHeader.title
+
+ // jolla-settings expects these properties:
+ property var applicationName
+ property var applicationIcon
+
+ SilicaFlickable {
+ anchors.fill: parent
+ contentHeight: content.height
+
+ Column {
+ id: content
+ width: parent.width
+
+ PageHeader {
+ id: pageHeader
+
+ rightMargin: Theme.horizontalPageMargin + (appIcon.visible ? (height - appIcon.padding) : 0)
+ title: applicationName ? applicationName : "Foil Pics"
+ description: applicationName ?
+ //: Settings page header description (app version)
+ //% "Version %1"
+ qsTrId("foilpics-settings_page-header-version").arg("1.1.1") : ""
+
+ Image {
+ id: appIcon
+ readonly property int padding: Theme.paddingLarge
+ readonly property int size: pageHeader.height - 2 * padding
+ x: pageHeader.width - width - Theme.horizontalPageMargin
+ y: padding
+ width: size
+ height: size
+ sourceSize: Qt.size(size,size)
+ source: applicationIcon ? applicationIcon : ""
+ visible: appIcon.status === Image.Ready
+ }
+ }
+
+ TextSwitch {
+ //: Text switch label
+ //% "Automatic locking"
+ text: qsTrId("foilpics-settings_page-autolock-text")
+ //: Text switch description
+ //% "Require to enter Foil password after unlocking the screen."
+ description: qsTrId("foilpics-settings_page-autolock-description")
+ automaticCheck: false
+ checked: autoLockConfig.value
+ onClicked: autoLockConfig.value = !autoLockConfig.value
+
+ ConfigurationValue {
+ id: autoLockConfig
+
+ key: rootPath + "autoLock"
+ defaultValue: true
+ }
+ }
+ }
+ }
+}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/src/FoilPicsDefs.h
^
|
@@ -34,12 +34,7 @@
#ifndef FOILPICS_DEFS_H
#define FOILPICS_DEFS_H
-#ifdef OPENREPOS
-# define FOILPICS_APP_NAME "openrepos-foilpics"
-#else
-# define FOILPICS_APP_NAME "harbour-foilpics"
-#endif
-
+#define FOILPICS_APP_NAME "harbour-foilpics"
#define FOILPICS_QML_IMPORT "harbour.foilpics"
#define FOILPICS_DCONF_ROOT "/apps/" FOILPICS_APP_NAME "/"
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/src/FoilPicsGroupModel.cpp
^
|
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2017-2021 Jolla Ltd.
- * Copyright (C) 2017-2021 Slava Monich <slava@monich.com>
+ * Copyright (C) 2017-2022 Jolla Ltd.
+ * Copyright (C) 2017-2022 Slava Monich <slava@monich.com>
*
* You may use this file under the terms of the BSD license as follows:
*
@@ -49,6 +49,7 @@
public:
static void encode(QByteArray* aDest, QByteArray aSrc);
static const char* decode(const char* aStart, char aStop, QByteArray* aBuf);
+ static int find(QList<Group> aList, QByteArray aId);
};
void FoilPicsGroupModel::Group::Private::encode(QByteArray* aDest, QByteArray aSrc)
@@ -81,17 +82,33 @@
return ptr;
}
+int FoilPicsGroupModel::Group::Private::find(QList<Group> aList, QByteArray aId)
+{
+ const int n = aList.count();
+ for (int i = 0; i < n; i++) {
+ if (aList.at(i).iId == aId) {
+ return i;
+ }
+ }
+ return -1;
+}
+
// ==========================================================================
// FoilPicsGroupModel::Group
// ==========================================================================
+FoilPicsGroupModel::Group::Group() :
+ iExpanded(true)
+{
+}
+
FoilPicsGroupModel::Group::Group(QByteArray aId, QString aName) :
- iId(aId), iName(aName)
+ iId(aId), iName(aName), iExpanded(true)
{
}
FoilPicsGroupModel::Group::Group(const Group& aGroup) :
- iId(aGroup.iId), iName(aGroup.iName)
+ iId(aGroup.iId), iName(aGroup.iName), iExpanded(aGroup.iExpanded)
{
}
@@ -115,7 +132,8 @@
bool FoilPicsGroupModel::Group::equals(const Group& aGroup) const
{
- return iId == aGroup.iId && iName == aGroup.iName;
+ return iExpanded == aGroup.iExpanded && iId == aGroup.iId &&
+ iName == aGroup.iName;
}
bool FoilPicsGroupModel::Group::isDefault() const
@@ -126,10 +144,11 @@
// Serialization format: "id1:name1,id2:name2"
FoilPicsGroupModel::GroupList
-FoilPicsGroupModel::Group::decodeList(const char* aString)
+FoilPicsGroupModel::Group::decodeList(const char* aString, const char* aCollapsed)
{
QByteArray buf;
GroupList groups;
+
const char* ptr = aString;
while (*ptr) {
ptr = Private::decode(ptr, GROUP_ID_SEPARATOR, &buf);
@@ -140,21 +159,43 @@
if (*ptr == GROUP_LIST_SEPARATOR) ptr++;
}
}
+
+ // Mark collapsed groups
+ if (aCollapsed) {
+ ptr = aCollapsed;
+ while (*ptr) {
+ ptr = Private::decode(ptr, GROUP_LIST_SEPARATOR, &buf);
+ if (*ptr == GROUP_LIST_SEPARATOR) ptr++;
+ if (!buf.isEmpty()) {
+ int i = Private::find(groups, buf);
+ if (i >= 0) {
+ groups[i].iExpanded = false;
+ }
+ }
+ }
+ }
+
return groups;
}
-QByteArray FoilPicsGroupModel::Group::encodeList(QList<Group> aList)
+FoilPicsGroupModel::GroupInfo
+FoilPicsGroupModel::Group::encodeList(QList<Group> aList)
{
- QByteArray buf;
+ QByteArray groups, collapsed;
const int n = aList.count();
for (int i = 0; i < n; i++) {
const Group& group = aList.at(i);
- if (!buf.isEmpty()) buf.append(GROUP_LIST_SEPARATOR);
- Private::encode(&buf, group.iId);
- buf.append(GROUP_ID_SEPARATOR);
- Private::encode(&buf, group.iName.toUtf8());
+ if (!groups.isEmpty()) groups.append(GROUP_LIST_SEPARATOR);
+ Private::encode(&groups, group.iId);
+ groups.append(GROUP_ID_SEPARATOR);
+ Private::encode(&groups, group.iName.toUtf8());
+ // Default group is always expanded but let's double-check...
+ if (!group.iExpanded && !group.iId.isEmpty()) {
+ if (!collapsed.isEmpty()) collapsed.append(GROUP_LIST_SEPARATOR);
+ Private::encode(&collapsed, group.iId);
+ }
}
- return buf;
+ return GroupInfo(groups,collapsed);
}
// ==========================================================================
@@ -263,6 +304,7 @@
GroupNameRole,
GroupPicsModelRole,
GroupPicsCountRole,
+ GroupExpandedRole,
FirstGroupRole,
DefaultGroupRole
};
@@ -354,6 +396,7 @@
case GroupNameRole: return iGroup.iName;
case GroupPicsModelRole: return QVariant::fromValue(proxyModel());
case GroupPicsCountRole: return proxyModel()->rowCount();
+ case GroupExpandedRole: return iGroup.iExpanded;
case FirstGroupRole: return (iLastKnownFirstGroup = isFirstGroup());
case DefaultGroupRole: return iGroup.isDefault();
// No default to make sure that we get "warning: enumeration value
@@ -750,6 +793,11 @@
connect(this, SIGNAL(modelReset()), SIGNAL(countChanged()));
}
+Qt::ItemFlags FoilPicsGroupModel::flags(const QModelIndex& aIndex) const
+{
+ return QAbstractListModel::flags(aIndex) | Qt::ItemIsEditable;
+}
+
QHash<int,QByteArray> FoilPicsGroupModel::roleNames() const
{
QHash<int,QByteArray> roles;
@@ -757,6 +805,7 @@
roles.insert(ModelData::GroupNameRole, "groupName");
roles.insert(ModelData::GroupPicsModelRole, "groupPicsModel");
roles.insert(ModelData::GroupPicsCountRole, "groupPicsCount");
+ roles.insert(ModelData::GroupExpandedRole, "groupExpanded");
roles.insert(ModelData::FirstGroupRole, "firstGroup");
roles.insert(ModelData::DefaultGroupRole, "defaultGroup");
return roles;
@@ -773,6 +822,51 @@
return data ? data->get((ModelData::Role)aRole) : QVariant();
}
+bool FoilPicsGroupModel::setData(const QModelIndex& aIndex, const QVariant& aValue, int aRole)
+{
+ const int row = aIndex.row();
+ ModelData* data = iPrivate->dataAt(row);
+ if (data) {
+ switch ((ModelData::Role)aRole) {
+ case ModelData::GroupNameRole:
+ {
+ const QString name(aValue.toString());
+ if (data->iGroup.iName != name) {
+ data->iGroup.iName = name;
+ QVector<int> roles;
+ roles.append(aRole);
+ HDEBUG(row << "groupName" << name);
+ const Group group(data->iGroup);
+ Q_EMIT groupRenamed(row, group);
+ Q_EMIT dataChanged(aIndex, aIndex, roles);
+ }
+ }
+ return true;
+ case ModelData::GroupExpandedRole:
+ {
+ const bool expanded = aValue.toBool();
+ if (data->iGroup.iExpanded != expanded) {
+ data->iGroup.iExpanded = expanded;
+ QVector<int> roles;
+ roles.append(aRole);
+ HDEBUG(row << "groupExpanded" << expanded);
+ Q_EMIT dataChanged(aIndex, aIndex, roles);
+ }
+ }
+ return true;
+ // No default to make sure that we get "warning: enumeration value
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/src/FoilPicsGroupModel.h
^
|
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2017-2021 Jolla Ltd.
- * Copyright (C) 2017-2021 Slava Monich <slava@monich.com>
+ * Copyright (C) 2017-2022 Jolla Ltd.
+ * Copyright (C) 2017-2022 Slava Monich <slava@monich.com>
*
* You may use this file under the terms of the BSD license as follows:
*
@@ -44,13 +44,16 @@
Q_PROPERTY(int count READ rowCount NOTIFY countChanged)
public:
+ typedef QPair<QByteArray,QByteArray> GroupInfo; // <groups,collapsed>
+
class Group {
public:
QByteArray iId;
QString iName;
+ bool iExpanded;
public:
class Private;
- Group() {}
+ Group();
Group(QByteArray aId, QString aName);
Group(const Group& aGroup);
Group& operator = (const Group& aGroup);
@@ -58,8 +61,8 @@
bool operator != (const Group& aGroup) const;
bool equals(const Group& aGroup) const;
bool isDefault() const;
- static QList<Group> decodeList(const char* aString);
- static QByteArray encodeList(QList<Group> aList);
+ static QList<Group> decodeList(const char* aString, const char* aCollapsed);
+ static GroupInfo encodeList(QList<Group> aList);
};
typedef QList<Group> GroupList;
@@ -73,9 +76,11 @@
void clear();
// QAbstractListModel
- virtual QHash<int,QByteArray> roleNames() const;
- virtual int rowCount(const QModelIndex& aParent = QModelIndex()) const;
- virtual QVariant data(const QModelIndex& aIndex, int aRole) const;
+ Qt::ItemFlags flags(const QModelIndex& aIndex) const Q_DECL_OVERRIDE;
+ QHash<int,QByteArray> roleNames() const Q_DECL_OVERRIDE;
+ int rowCount(const QModelIndex& aParent = QModelIndex()) const Q_DECL_OVERRIDE;
+ QVariant data(const QModelIndex& aIndex, int aRole) const Q_DECL_OVERRIDE;
+ bool setData(const QModelIndex& aIndex, const QVariant& aValue, int aRole) Q_DECL_OVERRIDE;
Q_INVOKABLE QString groupName(QString aId) const;
Q_INVOKABLE QString groupNameAt(int aIndex) const;
@@ -86,7 +91,6 @@
Q_INVOKABLE int offsetWithinGroup(int aGroupIndex, int aSourceIndex) const;
Q_INVOKABLE void addGroup(QString aName);
- Q_INVOKABLE void renameGroupAt(int aIndex, QString aName);
Q_INVOKABLE void removeGroupAt(int aIndex);
Q_INVOKABLE void moveGroup(int aFrom, int aTo);
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/src/FoilPicsModel.cpp
^
|
@@ -83,6 +83,9 @@
#define INFO_ORDER_DELIMITER_S ","
#define INFO_ORDER_THUMB_DELIMITER ':'
#define INFO_GROUPS_HEADER "Groups"
+#define INFO_COLLAPSED_HEADER "Collapsed"
+#define INFO_COLLAPSED_DELIMITER INFO_ORDER_DELIMITER
+#define INFO_COLLAPSED_DELIMITER_S INFO_ORDER_DELIMITER_S
// Directories relative to home
#define FOIL_PICS_DIR "Documents/FoilPics"
@@ -550,8 +553,14 @@
}
const char* groups = foilmsg_get_value(msg, INFO_GROUPS_HEADER);
if (groups) {
- HDEBUG(groups);
- iGroups = FoilPicsGroupModel::Group::decodeList(groups);
+ const char* collapsed = foilmsg_get_value(msg, INFO_COLLAPSED_HEADER);
+#if HARBOUR_DEBUG
+ HDEBUG(INFO_GROUPS_HEADER << groups);
+ if (collapsed) {
+ HDEBUG(INFO_COLLAPSED_HEADER << collapsed);
+ }
+#endif // HARBOUR_DEBUG
+ iGroups = FoilPicsGroupModel::Group::decodeList(groups, collapsed);
}
}
@@ -597,23 +606,33 @@
}
const QByteArray order(buf.toUtf8());
- const QByteArray groups = FoilPicsGroupModel::Group::encodeList(iGroups);
-
- HDEBUG("Saving" << fname);
- HDEBUG(INFO_ORDER_HEADER ":" << order.constData());
- HDEBUG(INFO_GROUPS_HEADER ":" << groups.constData());
+ const FoilPicsGroupModel::GroupInfo groupInfo(FoilPicsGroupModel::Group::encodeList(iGroups));
+ const QByteArray groups(groupInfo.first);
+ const QByteArray collapsed(groupInfo.second);
FoilMsgHeaders headers;
- FoilMsgHeader header[2];
+ FoilMsgHeader header[3];
headers.header = header;
headers.count = 0;
+
+ HDEBUG("Saving" << fname);
+ HDEBUG(INFO_ORDER_HEADER ":" << order.constData());
header[headers.count].name = INFO_ORDER_HEADER;
header[headers.count].value = order.constData();
headers.count++;
+
+ HDEBUG(INFO_GROUPS_HEADER ":" << groups.constData());
header[headers.count].name = INFO_GROUPS_HEADER;
header[headers.count].value = groups.constData();
headers.count++;
+ if (!collapsed.isEmpty()) {
+ HDEBUG(INFO_COLLAPSED_HEADER ":" << collapsed.constData());
+ header[headers.count].name = INFO_COLLAPSED_HEADER;
+ header[headers.count].value = collapsed.constData();
+ headers.count++;
+ }
+
FoilMsgEncryptOptions opt;
memset(&opt, 0, sizeof(opt));
opt.key_type = ENCRYPT_KEY_TYPE;
@@ -2533,8 +2552,13 @@
HDEBUG("Ignoring group model change");
} else {
// Save the info whenever group model changes
+ const bool wasBusy = busy();
sortModel();
saveInfo();
+ if (busy() != wasBusy) {
+ queueSignal(SignalBusyChanged);
+ }
+ emitQueuedSignals();
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/src/FoilPicsSettings.cpp
^
|
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2019 Jolla Ltd.
- * Copyright (C) 2019 Slava Monich <slava@monich.com>
+ * Copyright (C) 2019-2022 Jolla Ltd.
+ * Copyright (C) 2019-2022 Slava Monich <slava@monich.com>
*
* You may use this file under the terms of the BSD license as follows:
*
@@ -41,9 +41,11 @@
#define DCONF_KEY(x) FOILPICS_DCONF_ROOT x
#define KEY_SHARED_KEY_WARNING DCONF_KEY("sharedKeyWarning")
#define KEY_SHARED_KEY_WARNING2 DCONF_KEY("sharedKeyWarning2")
+#define KEY_AUTO_LOCK DCONF_KEY("autoLock")
#define KEY_AUTO_LOCK_TIME DCONF_KEY("autoLockTime")
#define DEFAULT_SHARED_KEY_WARNING true
+#define DEFAULT_AUTO_LOCK true
#define DEFAULT_AUTO_LOCK_TIME 15000
// ==========================================================================
@@ -57,22 +59,22 @@
public:
MGConfItem* iSharedKeyWarning;
MGConfItem* iSharedKeyWarning2;
+ MGConfItem* iAutoLock;
MGConfItem* iAutoLockTime;
- QVariant iDefaultSharedKeyWarning;
- QVariant iDefaultAutoLockTime;
};
FoilPicsSettings::Private::Private(FoilPicsSettings* aParent) :
iSharedKeyWarning(new MGConfItem(KEY_SHARED_KEY_WARNING, aParent)),
iSharedKeyWarning2(new MGConfItem(KEY_SHARED_KEY_WARNING2, aParent)),
- iAutoLockTime(new MGConfItem(KEY_AUTO_LOCK_TIME, aParent)),
- iDefaultSharedKeyWarning(DEFAULT_SHARED_KEY_WARNING),
- iDefaultAutoLockTime(DEFAULT_AUTO_LOCK_TIME)
+ iAutoLock(new MGConfItem(KEY_AUTO_LOCK, aParent)),
+ iAutoLockTime(new MGConfItem(KEY_AUTO_LOCK_TIME, aParent))
{
QObject::connect(iSharedKeyWarning, SIGNAL(valueChanged()),
aParent, SIGNAL(sharedKeyWarningChanged()));
QObject::connect(iSharedKeyWarning2, SIGNAL(valueChanged()),
aParent, SIGNAL(sharedKeyWarning2Changed()));
+ QObject::connect(iAutoLock, SIGNAL(valueChanged()),
+ aParent, SIGNAL(autoLockChanged()));
QObject::connect(iAutoLockTime, SIGNAL(valueChanged()),
aParent, SIGNAL(autoLockTimeChanged()));
}
@@ -108,14 +110,14 @@
FoilPicsSettings::sharedKeyWarning()
const
{
- return iPrivate->iSharedKeyWarning->value(iPrivate->iDefaultSharedKeyWarning).toBool();
+ return iPrivate->iSharedKeyWarning->value(DEFAULT_SHARED_KEY_WARNING).toBool();
}
bool
FoilPicsSettings::sharedKeyWarning2()
const
{
- return iPrivate->iSharedKeyWarning2->value(iPrivate->iDefaultSharedKeyWarning).toBool();
+ return iPrivate->iSharedKeyWarning2->value(DEFAULT_SHARED_KEY_WARNING).toBool();
}
void
@@ -134,11 +136,29 @@
iPrivate->iSharedKeyWarning2->set(aValue);
}
+// autoLock
+
+bool
+FoilPicsSettings::autoLock() const
+{
+ return iPrivate->iAutoLock->value(DEFAULT_AUTO_LOCK).toBool();
+}
+
+void
+FoilPicsSettings::setAutoLock(
+ bool aValue)
+{
+ HDEBUG(aValue);
+ iPrivate->iAutoLock->set(aValue);
+}
+
+// autoLockTime
+
int
FoilPicsSettings::autoLockTime()
const
{
- QVariant val(iPrivate->iAutoLockTime->value(iPrivate->iDefaultAutoLockTime));
+ QVariant val(iPrivate->iAutoLockTime->value(DEFAULT_AUTO_LOCK_TIME));
bool ok;
const int ival(val.toInt(&ok));
return (ok && ival >= 0) ? ival : DEFAULT_AUTO_LOCK_TIME;
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/src/FoilPicsSettings.h
^
|
@@ -1,6 +1,6 @@
/*
- * Copyright (C) 2019 Jolla Ltd.
- * Copyright (C) 2019 Slava Monich <slava@monich.com>
+ * Copyright (C) 2019-2022 Jolla Ltd.
+ * Copyright (C) 2019-2022 Slava Monich <slava@monich.com>
*
* You may use this file under the terms of the BSD license as follows:
*
@@ -34,32 +34,41 @@
#ifndef FOILPICS_SETTINGS_H
#define FOILPICS_SETTINGS_H
-#include <QtQml>
+#include <QObject>
+
+class QQmlEngine;
+class QJSEngine;
class FoilPicsSettings : public QObject {
Q_OBJECT
Q_DISABLE_COPY(FoilPicsSettings)
Q_PROPERTY(bool sharedKeyWarning READ sharedKeyWarning WRITE setSharedKeyWarning NOTIFY sharedKeyWarningChanged)
Q_PROPERTY(bool sharedKeyWarning2 READ sharedKeyWarning2 WRITE setSharedKeyWarning2 NOTIFY sharedKeyWarning2Changed)
+ Q_PROPERTY(bool autoLock READ autoLock WRITE setAutoLock NOTIFY autoLockChanged)
Q_PROPERTY(int autoLockTime READ autoLockTime WRITE setAutoLockTime NOTIFY autoLockTimeChanged)
public:
explicit FoilPicsSettings(QObject* aParent = Q_NULLPTR);
~FoilPicsSettings();
- static QObject* createSingleton(QQmlEngine* aEngine, QJSEngine* aScript);
+ // Callback for qmlRegisterSingletonType<FoilPicsSettings>
+ static QObject* createSingleton(QQmlEngine*, QJSEngine*);
bool sharedKeyWarning() const;
bool sharedKeyWarning2() const;
- void setSharedKeyWarning(bool aValue);
- void setSharedKeyWarning2(bool aValue);
+ void setSharedKeyWarning(bool);
+ void setSharedKeyWarning2(bool);
+
+ bool autoLock() const;
+ void setAutoLock(bool);
int autoLockTime() const;
- void setAutoLockTime(int aValue);
+ void setAutoLockTime(int);
Q_SIGNALS:
void sharedKeyWarningChanged();
void sharedKeyWarning2Changed();
+ void autoLockChanged();
void autoLockTimeChanged();
private:
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/src/main.cpp
^
|
@@ -55,18 +55,24 @@
static void register_types(const char* uri, int v1 = 1, int v2 = 0)
{
- qmlRegisterType<HarbourSystemState>(uri, v1, v2, "SystemState");
- qmlRegisterSingletonType<HarbourProcessState>(uri, v1, v2, "HarbourProcessState", HarbourProcessState::createSingleton);
- qmlRegisterSingletonType<HarbourSystemInfo>(uri, v1, v2, "HarbourSystemInfo", HarbourSystemInfo::createSingleton);
- qmlRegisterSingletonType<HarbourTransferMethodsModel>(uri, v1, v2, "TransferMethodsModel", HarbourTransferMethodsModel::createSingleton);
- qmlRegisterSingletonType<FoilPicsSettings>(uri, v1, v2, "FoilPicsSettings", FoilPicsSettings::createSingleton);
- qmlRegisterSingletonType<FoilPics>(uri, v1, v2, "FoilPics", FoilPics::createSingleton);
- qmlRegisterType<FoilPicsBusyState>(uri, v1, v2, "FoilPicsBusyState");
- qmlRegisterType<FoilPicsHints>(uri, v1, v2, "FoilPicsHints");
- qmlRegisterType<FoilPicsModel>(uri, v1, v2, "FoilPicsModel");
- qmlRegisterType<FoilPicsModelWatch>(uri, v1, v2, "FoilPicsModelWatch");
- qmlRegisterType<FoilPicsSelection>(uri, v1, v2, "FoilPicsSelection");
- qmlRegisterType<FoilPicsSelectionState>(uri, v1, v2, "FoilPicsSelectionState");
+#define REGISTER_TYPE(uri, v1, v2, Class) \
+ qmlRegisterType<Class>(uri, v1, v2, #Class)
+#define REGISTER_SINGLETON_TYPE(uri, v1, v2, Class) \
+ qmlRegisterSingletonType<Class>(uri, v1, v2, #Class, \
+ Class::createSingleton)
+
+ REGISTER_SINGLETON_TYPE(uri, v1, v2, HarbourSystemState);
+ REGISTER_SINGLETON_TYPE(uri, v1, v2, HarbourProcessState);
+ REGISTER_SINGLETON_TYPE(uri, v1, v2, HarbourSystemInfo);
+ REGISTER_SINGLETON_TYPE(uri, v1, v2, HarbourTransferMethodsModel);
+ REGISTER_SINGLETON_TYPE(uri, v1, v2, FoilPicsSettings);
+ REGISTER_SINGLETON_TYPE(uri, v1, v2, FoilPics);
+ REGISTER_TYPE(uri, v1, v2, FoilPicsBusyState);
+ REGISTER_TYPE(uri, v1, v2, FoilPicsHints);
+ REGISTER_TYPE(uri, v1, v2, FoilPicsModel);
+ REGISTER_TYPE(uri, v1, v2, FoilPicsModelWatch);
+ REGISTER_TYPE(uri, v1, v2, FoilPicsSelection);
+ REGISTER_TYPE(uri, v1, v2, FoilPicsSelectionState);
}
int main(int argc, char *argv[])
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/translations/harbour-foilpics-de.ts
^
|
@@ -455,6 +455,21 @@
<extracomment>Warning text, small size label below the password prompt</extracomment>
<translation type="unfinished">Beachten Sie, dass alle Foil-Apps denselben Verschlüsselungsschlüssel und dasselbe Kennwort verwenden.</translation>
</message>
+ <message id="foilpics-settings_page-header-version">
+ <source>Version %1</source>
+ <extracomment>Settings page header description (app version)</extracomment>
+ <translation type="unfinished">Version %1</translation>
+ </message>
+ <message id="foilpics-settings_page-autolock-text">
+ <source>Automatic locking</source>
+ <extracomment>Text switch label</extracomment>
+ <translation type="unfinished">Automatische Sperrung</translation>
+ </message>
+ <message id="foilpics-settings_page-autolock-description">
+ <source>Require to enter Foil password after unlocking the screen.</source>
+ <extracomment>Text switch description</extracomment>
+ <translation type="unfinished">Nach dem Entsperren des Bildschirms muss das Foil-Passwort eingegeben werden.</translation>
+ </message>
<message id="jail-explanation">
<source>This application is not designed to function in a sandbox. Try installing the latest version from <b><a href='%1'>OpenRepos</a></b> or <b><a href='%2'>GitHub</a></b>, it may implement some sort of a workaround. No guarantee, though.</source>
<extracomment>Label text explaining the sandbox situation</extracomment>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/translations/harbour-foilpics-es.ts
^
|
@@ -455,6 +455,21 @@
<extracomment>Warning text, small size label below the password prompt</extracomment>
<translation type="unfinished">Tenga en cuenta que todas las aplicaciones de Foil usan la misma clave de cifrado y contraseña.</translation>
</message>
+ <message id="foilpics-settings_page-header-version">
+ <source>Version %1</source>
+ <extracomment>Settings page header description (app version)</extracomment>
+ <translation type="unfinished">Versión %1</translation>
+ </message>
+ <message id="foilpics-settings_page-autolock-text">
+ <source>Automatic locking</source>
+ <extracomment>Text switch label</extracomment>
+ <translation type="unfinished">Bloqueo automático</translation>
+ </message>
+ <message id="foilpics-settings_page-autolock-description">
+ <source>Require to enter Foil password after unlocking the screen.</source>
+ <extracomment>Text switch description</extracomment>
+ <translation type="unfinished">Requiere ingresar la contraseña de Foil después de desbloquear la pantalla.</translation>
+ </message>
<message id="jail-explanation">
<source>This application is not designed to function in a sandbox. Try installing the latest version from <b><a href='%1'>OpenRepos</a></b> or <b><a href='%2'>GitHub</a></b>, it may implement some sort of a workaround. No guarantee, though.</source>
<extracomment>Label text explaining the sandbox situation</extracomment>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/translations/harbour-foilpics-fr.ts
^
|
@@ -455,6 +455,21 @@
<extracomment>Warning text, small size label below the password prompt</extracomment>
<translation>Sachez que toutes les applications Foil partagent leur clef de chiffrement et leur mot de passe.</translation>
</message>
+ <message id="foilpics-settings_page-header-version">
+ <source>Version %1</source>
+ <extracomment>Settings page header description (app version)</extracomment>
+ <translation type="unfinished">Version %1</translation>
+ </message>
+ <message id="foilpics-settings_page-autolock-text">
+ <source>Automatic locking</source>
+ <extracomment>Text switch label</extracomment>
+ <translation type="unfinished">Verrouillage automatique</translation>
+ </message>
+ <message id="foilpics-settings_page-autolock-description">
+ <source>Require to enter Foil password after unlocking the screen.</source>
+ <extracomment>Text switch description</extracomment>
+ <translation type="unfinished">Nécessite d'entrer le mot de passe Foil après avoir déverrouillé l'écran.</translation>
+ </message>
<message id="jail-explanation">
<source>This application is not designed to function in a sandbox. Try installing the latest version from <b><a href='%1'>OpenRepos</a></b> or <b><a href='%2'>GitHub</a></b>, it may implement some sort of a workaround. No guarantee, though.</source>
<extracomment>Label text explaining the sandbox situation</extracomment>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/translations/harbour-foilpics-hu.ts
^
|
@@ -451,6 +451,21 @@
<extracomment>Warning text, small size label below the password prompt</extracomment>
<translation>Figyeljen rá, hogy mindegyik Foil alkalmazás ugyanazt a titkosítási kulcsot és jelszót használja.</translation>
</message>
+ <message id="foilpics-settings_page-header-version">
+ <source>Version %1</source>
+ <extracomment>Settings page header description (app version)</extracomment>
+ <translation type="unfinished">Verzió %1</translation>
+ </message>
+ <message id="foilpics-settings_page-autolock-text">
+ <source>Automatic locking</source>
+ <extracomment>Text switch label</extracomment>
+ <translation type="unfinished">Automatikus lezárás</translation>
+ </message>
+ <message id="foilpics-settings_page-autolock-description">
+ <source>Require to enter Foil password after unlocking the screen.</source>
+ <extracomment>Text switch description</extracomment>
+ <translation type="unfinished">A képernyő feloldása után meg kell adnia a Foil jelszót.</translation>
+ </message>
<message id="jail-explanation">
<source>This application is not designed to function in a sandbox. Try installing the latest version from <b><a href='%1'>OpenRepos</a></b> or <b><a href='%2'>GitHub</a></b>, it may implement some sort of a workaround. No guarantee, though.</source>
<extracomment>Label text explaining the sandbox situation</extracomment>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/translations/harbour-foilpics-nl.ts
^
|
@@ -455,6 +455,21 @@
<extracomment>Warning text, small size label below the password prompt</extracomment>
<translation>Merk op dat alle Foil-apps dezelfde coderingssleutel en wachtwoord gebruiken.</translation>
</message>
+ <message id="foilpics-settings_page-header-version">
+ <source>Version %1</source>
+ <extracomment>Settings page header description (app version)</extracomment>
+ <translation type="unfinished">Versie %1</translation>
+ </message>
+ <message id="foilpics-settings_page-autolock-text">
+ <source>Automatic locking</source>
+ <extracomment>Text switch label</extracomment>
+ <translation type="unfinished">Automatisch vergrendelen</translation>
+ </message>
+ <message id="foilpics-settings_page-autolock-description">
+ <source>Require to enter Foil password after unlocking the screen.</source>
+ <extracomment>Text switch description</extracomment>
+ <translation type="unfinished">Vereisen om Foil wachtwoord in te voeren nadat het scherm is ontgrendeld.</translation>
+ </message>
<message id="jail-explanation">
<source>This application is not designed to function in a sandbox. Try installing the latest version from <b><a href='%1'>OpenRepos</a></b> or <b><a href='%2'>GitHub</a></b>, it may implement some sort of a workaround. No guarantee, though.</source>
<extracomment>Label text explaining the sandbox situation</extracomment>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/translations/harbour-foilpics-pl.ts
^
|
@@ -459,6 +459,21 @@
<extracomment>Warning text, small size label below the password prompt</extracomment>
<translation>Pamiętaj, że wszystkie aplikacje Foil współdzielą klucz szyfrowania i hasło.</translation>
</message>
+ <message id="foilpics-settings_page-header-version">
+ <source>Version %1</source>
+ <extracomment>Settings page header description (app version)</extracomment>
+ <translation>Wersja %1</translation>
+ </message>
+ <message id="foilpics-settings_page-autolock-text">
+ <source>Automatic locking</source>
+ <extracomment>Text switch label</extracomment>
+ <translation type="unfinished">Automatyczne blokowanie</translation>
+ </message>
+ <message id="foilpics-settings_page-autolock-description">
+ <source>Require to enter Foil password after unlocking the screen.</source>
+ <extracomment>Text switch description</extracomment>
+ <translation type="unfinished">Wymagaj podania Foil hasła po odblokowaniu ekranu.</translation>
+ </message>
<message id="jail-explanation">
<source>This application is not designed to function in a sandbox. Try installing the latest version from <b><a href='%1'>OpenRepos</a></b> or <b><a href='%2'>GitHub</a></b>, it may implement some sort of a workaround. No guarantee, though.</source>
<extracomment>Label text explaining the sandbox situation</extracomment>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/translations/harbour-foilpics-ru.ts
^
|
@@ -459,6 +459,21 @@
<extracomment>Warning text, small size label below the password prompt</extracomment>
<translation>Имейте в виду, что все Foil приложения использует тот же ключ с тем же паролем.</translation>
</message>
+ <message id="foilpics-settings_page-header-version">
+ <source>Version %1</source>
+ <extracomment>Settings page header description (app version)</extracomment>
+ <translation>Версия %1</translation>
+ </message>
+ <message id="foilpics-settings_page-autolock-text">
+ <source>Automatic locking</source>
+ <extracomment>Text switch label</extracomment>
+ <translation>Автоматическая блокировка</translation>
+ </message>
+ <message id="foilpics-settings_page-autolock-description">
+ <source>Require to enter Foil password after unlocking the screen.</source>
+ <extracomment>Text switch description</extracomment>
+ <translation>Требовать ввода пароля после разблокировки экрана.</translation>
+ </message>
<message id="jail-explanation">
<source>This application is not designed to function in a sandbox. Try installing the latest version from <b><a href='%1'>OpenRepos</a></b> or <b><a href='%2'>GitHub</a></b>, it may implement some sort of a workaround. No guarantee, though.</source>
<extracomment>Label text explaining the sandbox situation</extracomment>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/translations/harbour-foilpics-sv.ts
^
|
@@ -456,6 +456,21 @@
<extracomment>Warning text, small size label below the password prompt</extracomment>
<translation type="unfinished">Notera att alla Foil-appar delar krypteringsnyckel och lösenord.</translation>
</message>
+ <message id="foilpics-settings_page-header-version">
+ <source>Version %1</source>
+ <extracomment>Settings page header description (app version)</extracomment>
+ <translation>Version %1</translation>
+ </message>
+ <message id="foilpics-settings_page-autolock-text">
+ <source>Automatic locking</source>
+ <extracomment>Text switch label</extracomment>
+ <translation type="unfinished">Automatisk låsning</translation>
+ </message>
+ <message id="foilpics-settings_page-autolock-description">
+ <source>Require to enter Foil password after unlocking the screen.</source>
+ <extracomment>Text switch description</extracomment>
+ <translation type="unfinished">Kräv att ange Foil lösenord efter att ha låst upp skärmen.</translation>
+ </message>
<message id="jail-explanation">
<source>This application is not designed to function in a sandbox. Try installing the latest version from <b><a href='%1'>OpenRepos</a></b> or <b><a href='%2'>GitHub</a></b>, it may implement some sort of a workaround. No guarantee, though.</source>
<extracomment>Label text explaining the sandbox situation</extracomment>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/translations/harbour-foilpics-zh_CN.ts
^
|
@@ -451,6 +451,21 @@
<extracomment>Warning text, small size label below the password prompt</extracomment>
<translation>请记住所有的 Foil 系列软件均使用相同的加密秘钥及密码。</translation>
</message>
+ <message id="foilpics-settings_page-header-version">
+ <source>Version %1</source>
+ <extracomment>Settings page header description (app version)</extracomment>
+ <translation type="unfinished">版本 %1</translation>
+ </message>
+ <message id="foilpics-settings_page-autolock-text">
+ <source>Automatic locking</source>
+ <extracomment>Text switch label</extracomment>
+ <translation type="unfinished">自动锁定</translation>
+ </message>
+ <message id="foilpics-settings_page-autolock-description">
+ <source>Require to enter Foil password after unlocking the screen.</source>
+ <extracomment>Text switch description</extracomment>
+ <translation type="unfinished">解锁屏幕后需要输入Foil密码。</translation>
+ </message>
<message id="jail-explanation">
<source>This application is not designed to function in a sandbox. Try installing the latest version from <b><a href='%1'>OpenRepos</a></b> or <b><a href='%2'>GitHub</a></b>, it may implement some sort of a workaround. No guarantee, though.</source>
<extracomment>Label text explaining the sandbox situation</extracomment>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-foilpics-1.1.1.tar.gz/translations/harbour-foilpics.ts
^
|
@@ -455,6 +455,21 @@
<extracomment>Warning text, small size label below the password prompt</extracomment>
<translation>Note that all Foil apps use the same encryption key and password.</translation>
</message>
+ <message id="foilpics-settings_page-header-version">
+ <source>Version %1</source>
+ <extracomment>Settings page header description (app version)</extracomment>
+ <translation>Version %1</translation>
+ </message>
+ <message id="foilpics-settings_page-autolock-text">
+ <source>Automatic locking</source>
+ <extracomment>Text switch label</extracomment>
+ <translation>Automatic locking</translation>
+ </message>
+ <message id="foilpics-settings_page-autolock-description">
+ <source>Require to enter Foil password after unlocking the screen.</source>
+ <extracomment>Text switch description</extracomment>
+ <translation>Require to enter Foil password after unlocking the screen.</translation>
+ </message>
<message id="jail-explanation">
<source>This application is not designed to function in a sandbox. Try installing the latest version from <b><a href='%1'>OpenRepos</a></b> or <b><a href='%2'>GitHub</a></b>, it may implement some sort of a workaround. No guarantee, though.</source>
<extracomment>Label text explaining the sandbox situation</extracomment>
|