CANConfigPython 0.1.0a1__py3-none-win32.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- canconfigpython/__init__.py +7 -0
- canconfigpython/__main__.py +3 -0
- canconfigpython/cli.py +111 -0
- canconfigpython/client.py +243 -0
- canconfigpython/commands.py +57 -0
- canconfigpython/errors.py +19 -0
- canconfigpython/resources/docs/native-source.tar.gz +0 -0
- canconfigpython/resources/docs/user-guide.en.md +274 -0
- canconfigpython/resources/docs/user-guide.zh-CN.md +265 -0
- canconfigpython/resources/skill/canconfig-python/SKILL.md +71 -0
- canconfigpython/resources/skill/canconfig-python/agents/openai.yaml +4 -0
- canconfigpython/resources/skill/canconfig-python/assets/changes.schema.json +832 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/bridge_dual_rates.json +18 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/bridge_mapping.json +13 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/cancom_115200_8n1.json +10 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/cancom_format_crc.json +8 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/cancom_gap.json +8 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/cancom_transparent_id.json +10 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/fb_1m.json +12 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/fb_500k.json +12 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/fb_adaptive_single.json +7 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/fb_return_manual.json +22 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/fb_silent_adaptive_option.json +7 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/filter_blacklist.json +7 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/filter_mask.json +12 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/filter_range.json +12 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/hub_h_external.json +13 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/hub_input_filter.json +13 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/hub_l_external.json +13 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/hub_mapping.json +46 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/hub_routing.json +8 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/index.en.md +55 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/index.json +661 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/index.zh-CN.md +55 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/negative/adaptive_mixed.json +8 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/negative/hub_missing_ps.json +12 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/negative/restricted_inheritance.json +12 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/negative/short_user_data.json +7 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/negative/string_numeric_id.json +7 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/negative/unknown_field.json +7 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/negative/unsupported_adaptive.json +7 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/negative/wrong_uid.json +7 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/rpt_adaptive_all.json +12 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/rpt_silent.json +7 -0
- canconfigpython/resources/skill/canconfig-python/assets/examples/user_data.json +7 -0
- canconfigpython/resources/skill/canconfig-python/references/operations.md +68 -0
- canconfigpython/resources.py +17 -0
- canconfigpython/runtime/Qt5Core.dll +0 -0
- canconfigpython/runtime/Qt5Network.dll +0 -0
- canconfigpython/runtime/Qt5SerialPort.dll +0 -0
- canconfigpython/runtime/WIICAN.dll +0 -0
- canconfigpython/runtime/canconfigconsole.exe +0 -0
- canconfigpython/runtime/libgcc_s_dw2-1.dll +0 -0
- canconfigpython/runtime/libstdc++-6.dll +0 -0
- canconfigpython/runtime/libwinpthread-1.dll +0 -0
- canconfigpython/runtime/manifest.json +19 -0
- canconfigpython/runtime.py +61 -0
- canconfigpython-0.1.0a1.dist-info/GPL-3.0.txt +674 -0
- canconfigpython-0.1.0a1.dist-info/LICENSE +21 -0
- canconfigpython-0.1.0a1.dist-info/METADATA +197 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-LICENSE.txt +866 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-LICENSE.FDL.txt +450 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-LICENSE.GPL2.txt +339 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-LICENSE.GPL3-EXCEPT.txt +704 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-LICENSE.GPL3.txt +674 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-LICENSE.GPLv3.txt +686 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-LICENSE.LGPL3.txt +165 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-LICENSE.LGPLv21.txt +514 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-LICENSE.LGPLv3.txt +175 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-LICENSE.PREVIEW.COMMERCIAL.txt +626 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__angle__LICENSE.txt +32 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__angle__src__libANGLE__renderer__d3d__d3d11__dxgi_support_data.json.txt +1164 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__angle__src__libANGLE__renderer__d3d__d3d11__load_functions_data.json.txt +1116 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__angle__src__libANGLE__renderer__d3d__d3d11__swizzle_format_data.json.txt +77 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__angle__src__libANGLE__renderer__d3d__d3d11__texture_format_data.json.txt +692 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__angle__src__third_party__compiler__LICENSE.txt +22 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__angle__src__third_party__murmurhash__LICENSE.txt +2 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__double-conversion__LICENSE.txt +26 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__easing__easing.cpp.txt +670 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__easing__legal.qdoc.txt +35 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__forkfd__forkfd.c.txt +875 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__forkfd__forkfd.h.txt +66 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__forkfd__forkfd_gcc.h.txt +63 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__freebsd__0001-Patch-the-FreeBSD-strto-u-ll-functions-to-work-insid.patch.txt +151 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__freebsd__strtoll.c.txt +134 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__freebsd__strtoull.c.txt +112 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__freetype__docs__LICENSE.TXT.txt +37 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__freetype__src__tools__no-copyright.txt +61 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__freetype__src__tools__update-copyright-year.txt +135 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__freetype__src__tools__update-copyright.txt +14 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__harfbuzz-ng__COPYING.txt +36 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__harfbuzz__COPYING.txt +24 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__libpng__LICENSE.txt +112 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__md4__md4.cpp.txt +265 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__md4__md4.h.txt +31 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__md5__md5.cpp.txt +247 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__md5__md5.h.txt +48 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__pcre__COPYING.txt +5 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__pcre__LICENCE.txt +93 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__rfc6234__patches__0001-Fix-compilation-MSVC-warning-in-3rdparty-rfc6234.patch.txt +86 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__rfc6234__sha-private.h.txt +28 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__rfc6234__sha.h.txt +357 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__rfc6234__sha224-256.c.txt +583 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__rfc6234__sha384-512.c.txt +1034 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha1__sha1.cpp.txt +261 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-32-rvk.macros.txt +555 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-32.macros.txt +26 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-64.macros.txt +728 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-int-set.h.txt +6 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-interface.h.txt +46 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-opt32-settings.h.txt +4 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-opt32.c.txt +524 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-opt64-settings.h.txt +7 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-opt64.c.txt +512 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakF-1600-unrolling.macros.txt +124 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakNISTInterface.c.txt +82 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakNISTInterface.h.txt +70 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakSponge.c.txt +266 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__KeccakSponge.h.txt +80 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__sha3__brg_endian.h.txt +142 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtbase-src__3rdparty__xkbcommon__COPYING.txt +188 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtserialport-LICENSE.FDL.txt +450 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtserialport-LICENSE.GPL2.txt +339 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtserialport-LICENSE.GPL3-EXCEPT.txt +704 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtserialport-LICENSE.GPL3.txt +674 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtserialport-LICENSE.GPLv2.txt +292 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtserialport-LICENSE.GPLv3.txt +686 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtserialport-LICENSE.LGPL3.txt +165 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtserialport-LICENSE.LGPLv21.txt +514 -0
- canconfigpython-0.1.0a1.dist-info/Qt-5.7.1-qtserialport-LICENSE.LGPLv3.txt +175 -0
- canconfigpython-0.1.0a1.dist-info/RECORD +165 -0
- canconfigpython-0.1.0a1.dist-info/THIRD_PARTY_NOTICES.md +69 -0
- canconfigpython-0.1.0a1.dist-info/WHEEL +5 -0
- canconfigpython-0.1.0a1.dist-info/entry_points.txt +3 -0
- canconfigpython-0.1.0a1.dist-info/gcc-COPYING.RUNTIME.txt +73 -0
- canconfigpython-0.1.0a1.dist-info/gcc-COPYING3.LIB.txt +165 -0
- canconfigpython-0.1.0a1.dist-info/gcc-COPYING3.txt +674 -0
- canconfigpython-0.1.0a1.dist-info/linux-libc6-copyright.txt +529 -0
- canconfigpython-0.1.0a1.dist-info/linux-libcap2-copyright.txt +112 -0
- canconfigpython-0.1.0a1.dist-info/linux-libcom-err2-copyright.txt +403 -0
- canconfigpython-0.1.0a1.dist-info/linux-libdouble-conversion3-copyright.txt +41 -0
- canconfigpython-0.1.0a1.dist-info/linux-libgcc-s1-copyright.txt +1532 -0
- canconfigpython-0.1.0a1.dist-info/linux-libglib2.0-0t64-copyright.txt +1250 -0
- canconfigpython-0.1.0a1.dist-info/linux-libgssapi-krb5-2-copyright.txt +1374 -0
- canconfigpython-0.1.0a1.dist-info/linux-libicu74-copyright.txt +49 -0
- canconfigpython-0.1.0a1.dist-info/linux-libk5crypto3-copyright.txt +1374 -0
- canconfigpython-0.1.0a1.dist-info/linux-libkeyutils1-copyright.txt +52 -0
- canconfigpython-0.1.0a1.dist-info/linux-libkrb5-3-copyright.txt +1374 -0
- canconfigpython-0.1.0a1.dist-info/linux-libkrb5support0-copyright.txt +1374 -0
- canconfigpython-0.1.0a1.dist-info/linux-libpcre2-16-0-copyright.txt +122 -0
- canconfigpython-0.1.0a1.dist-info/linux-libpcre2-8-0-copyright.txt +122 -0
- canconfigpython-0.1.0a1.dist-info/linux-libqt5core5t64-copyright.txt +2932 -0
- canconfigpython-0.1.0a1.dist-info/linux-libqt5network5t64-copyright.txt +2932 -0
- canconfigpython-0.1.0a1.dist-info/linux-libqt5serialport5-copyright.txt +134 -0
- canconfigpython-0.1.0a1.dist-info/linux-libstdc++6-copyright.txt +1532 -0
- canconfigpython-0.1.0a1.dist-info/linux-libudev1-copyright.txt +287 -0
- canconfigpython-0.1.0a1.dist-info/linux-libzstd1-copyright.txt +123 -0
- canconfigpython-0.1.0a1.dist-info/linux-packages.json +102 -0
- canconfigpython-0.1.0a1.dist-info/linux-zlib1g-copyright.txt +84 -0
- canconfigpython-0.1.0a1.dist-info/mingw-w64-COPYING.MinGW-w64-runtime.txt.txt +240 -0
- canconfigpython-0.1.0a1.dist-info/mingw-w64-COPYING.MinGW-w64.txt.txt +135 -0
- canconfigpython-0.1.0a1.dist-info/mingw-w64-COPYING.txt +43 -0
- canconfigpython-0.1.0a1.dist-info/qt-source-notices.json +278 -0
- canconfigpython-0.1.0a1.dist-info/top_level.txt +1 -0
- canconfigpython-0.1.0a1.dist-info/winpthreads-COPYING.txt +57 -0
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This code implements the MD5 message-digest algorithm.
|
|
3
|
+
* The algorithm is due to Ron Rivest. This code was
|
|
4
|
+
* written by Colin Plumb in 1993, no copyright is claimed.
|
|
5
|
+
* This code is in the public domain; do with it what you wish.
|
|
6
|
+
*
|
|
7
|
+
* Equivalent code is available from RSA Data Security, Inc.
|
|
8
|
+
* This code has been tested against that, and is equivalent,
|
|
9
|
+
* except that you don't need to include two pages of legalese
|
|
10
|
+
* with every copy.
|
|
11
|
+
*
|
|
12
|
+
* To compute the message digest of a chunk of bytes, declare an
|
|
13
|
+
* MD5Context structure, pass it to MD5Init, call MD5Update as
|
|
14
|
+
* needed on buffers full of bytes, and then call MD5Final, which
|
|
15
|
+
* will fill a supplied 16-byte array with the digest.
|
|
16
|
+
*
|
|
17
|
+
* Changed so as no longer to depend on Colin Plumb's `usual.h' header
|
|
18
|
+
* definitions; now uses stuff from dpkg's config.h.
|
|
19
|
+
* - Ian Jackson <ian@chiark.greenend.org.uk>.
|
|
20
|
+
* Still in the public domain.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
#include <string.h> /* for memcpy() */
|
|
24
|
+
#ifndef _WIN32_WCE
|
|
25
|
+
#include <sys/types.h> /* for stupid systems */
|
|
26
|
+
#else
|
|
27
|
+
#include <windef.h>
|
|
28
|
+
#include <types.h>
|
|
29
|
+
#endif
|
|
30
|
+
|
|
31
|
+
#include "md5.h"
|
|
32
|
+
|
|
33
|
+
QT_BEGIN_NAMESPACE
|
|
34
|
+
|
|
35
|
+
static void
|
|
36
|
+
byteSwap(UWORD32 *buf, unsigned words)
|
|
37
|
+
{
|
|
38
|
+
const quint32 byteOrderTest = 0x1;
|
|
39
|
+
if (((const char *)&byteOrderTest)[0] == 0) {
|
|
40
|
+
md5byte *p = (md5byte *)buf;
|
|
41
|
+
|
|
42
|
+
do {
|
|
43
|
+
*buf++ = (UWORD32)((unsigned)p[3] << 8 | p[2]) << 16 |
|
|
44
|
+
((unsigned)p[1] << 8 | p[0]);
|
|
45
|
+
p += 4;
|
|
46
|
+
} while (--words);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/*
|
|
51
|
+
* Start MD5 accumulation. Set bit count to 0 and buffer to mysterious
|
|
52
|
+
* initialization constants.
|
|
53
|
+
*/
|
|
54
|
+
static void
|
|
55
|
+
MD5Init(struct MD5Context *ctx)
|
|
56
|
+
{
|
|
57
|
+
ctx->buf[0] = 0x67452301;
|
|
58
|
+
ctx->buf[1] = 0xefcdab89;
|
|
59
|
+
ctx->buf[2] = 0x98badcfe;
|
|
60
|
+
ctx->buf[3] = 0x10325476;
|
|
61
|
+
|
|
62
|
+
ctx->bytes[0] = 0;
|
|
63
|
+
ctx->bytes[1] = 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/*
|
|
67
|
+
* Update context to reflect the concatenation of another buffer full
|
|
68
|
+
* of bytes.
|
|
69
|
+
*/
|
|
70
|
+
static void
|
|
71
|
+
MD5Update(struct MD5Context *ctx, md5byte const *buf, unsigned len)
|
|
72
|
+
{
|
|
73
|
+
UWORD32 t;
|
|
74
|
+
|
|
75
|
+
/* Update byte count */
|
|
76
|
+
|
|
77
|
+
t = ctx->bytes[0];
|
|
78
|
+
if ((ctx->bytes[0] = t + len) < t)
|
|
79
|
+
ctx->bytes[1]++; /* Carry from low to high */
|
|
80
|
+
|
|
81
|
+
t = 64 - (t & 0x3f); /* Space available in ctx->in (at least 1) */
|
|
82
|
+
if (t > len) {
|
|
83
|
+
memcpy((md5byte *)ctx->in + 64 - t, buf, len);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
/* First chunk is an odd size */
|
|
87
|
+
memcpy((md5byte *)ctx->in + 64 - t, buf, t);
|
|
88
|
+
byteSwap(ctx->in, 16);
|
|
89
|
+
MD5Transform(ctx->buf, ctx->in);
|
|
90
|
+
buf += t;
|
|
91
|
+
len -= t;
|
|
92
|
+
|
|
93
|
+
/* Process data in 64-byte chunks */
|
|
94
|
+
while (len >= 64) {
|
|
95
|
+
memcpy(ctx->in, buf, 64);
|
|
96
|
+
byteSwap(ctx->in, 16);
|
|
97
|
+
MD5Transform(ctx->buf, ctx->in);
|
|
98
|
+
buf += 64;
|
|
99
|
+
len -= 64;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* Handle any remaining bytes of data. */
|
|
103
|
+
memcpy(ctx->in, buf, len);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/*
|
|
107
|
+
* Final wrapup - pad to 64-byte boundary with the bit pattern
|
|
108
|
+
* 1 0* (64-bit count of bits processed, MSB-first)
|
|
109
|
+
*/
|
|
110
|
+
static void
|
|
111
|
+
MD5Final(struct MD5Context *ctx, md5byte digest[16])
|
|
112
|
+
{
|
|
113
|
+
int count = ctx->bytes[0] & 0x3f; /* Number of bytes in ctx->in */
|
|
114
|
+
md5byte *p = (md5byte *)ctx->in + count;
|
|
115
|
+
|
|
116
|
+
/* Set the first char of padding to 0x80. There is always room. */
|
|
117
|
+
*p++ = 0x80;
|
|
118
|
+
|
|
119
|
+
/* Bytes of padding needed to make 56 bytes (-8..55) */
|
|
120
|
+
count = 56 - 1 - count;
|
|
121
|
+
|
|
122
|
+
if (count < 0) { /* Padding forces an extra block */
|
|
123
|
+
memset(p, 0, count + 8);
|
|
124
|
+
byteSwap(ctx->in, 16);
|
|
125
|
+
MD5Transform(ctx->buf, ctx->in);
|
|
126
|
+
p = (md5byte *)ctx->in;
|
|
127
|
+
count = 56;
|
|
128
|
+
}
|
|
129
|
+
memset(p, 0, count);
|
|
130
|
+
byteSwap(ctx->in, 14);
|
|
131
|
+
|
|
132
|
+
/* Append length in bits and transform */
|
|
133
|
+
ctx->in[14] = ctx->bytes[0] << 3;
|
|
134
|
+
ctx->in[15] = ctx->bytes[1] << 3 | ctx->bytes[0] >> 29;
|
|
135
|
+
MD5Transform(ctx->buf, ctx->in);
|
|
136
|
+
|
|
137
|
+
byteSwap(ctx->buf, 4);
|
|
138
|
+
memcpy(digest, ctx->buf, 16);
|
|
139
|
+
memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
#ifndef ASM_MD5
|
|
143
|
+
|
|
144
|
+
/* The four core functions - F1 is optimized somewhat */
|
|
145
|
+
|
|
146
|
+
/* #define F1(x, y, z) (x & y | ~x & z) */
|
|
147
|
+
#define F1(x, y, z) (z ^ (x & (y ^ z)))
|
|
148
|
+
#define F2(x, y, z) F1(z, x, y)
|
|
149
|
+
#define F3(x, y, z) (x ^ y ^ z)
|
|
150
|
+
#define F4(x, y, z) (y ^ (x | ~z))
|
|
151
|
+
|
|
152
|
+
/* This is the central step in the MD5 algorithm. */
|
|
153
|
+
#define MD5STEP(f,w,x,y,z,in,s) \
|
|
154
|
+
(w += f(x,y,z) + in, w = (w<<s | w>>(32-s)) + x)
|
|
155
|
+
|
|
156
|
+
/*
|
|
157
|
+
* The core of the MD5 algorithm, this alters an existing MD5 hash to
|
|
158
|
+
* reflect the addition of 16 longwords of new data. MD5Update blocks
|
|
159
|
+
* the data and converts bytes into longwords for this routine.
|
|
160
|
+
*/
|
|
161
|
+
static void
|
|
162
|
+
MD5Transform(UWORD32 buf[4], UWORD32 const in[16])
|
|
163
|
+
{
|
|
164
|
+
UWORD32 a, b, c, d;
|
|
165
|
+
|
|
166
|
+
a = buf[0];
|
|
167
|
+
b = buf[1];
|
|
168
|
+
c = buf[2];
|
|
169
|
+
d = buf[3];
|
|
170
|
+
|
|
171
|
+
MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7);
|
|
172
|
+
MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12);
|
|
173
|
+
MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17);
|
|
174
|
+
MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22);
|
|
175
|
+
MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7);
|
|
176
|
+
MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12);
|
|
177
|
+
MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17);
|
|
178
|
+
MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22);
|
|
179
|
+
MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7);
|
|
180
|
+
MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12);
|
|
181
|
+
MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17);
|
|
182
|
+
MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22);
|
|
183
|
+
MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7);
|
|
184
|
+
MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12);
|
|
185
|
+
MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17);
|
|
186
|
+
MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22);
|
|
187
|
+
|
|
188
|
+
MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5);
|
|
189
|
+
MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9);
|
|
190
|
+
MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14);
|
|
191
|
+
MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20);
|
|
192
|
+
MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5);
|
|
193
|
+
MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9);
|
|
194
|
+
MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14);
|
|
195
|
+
MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20);
|
|
196
|
+
MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5);
|
|
197
|
+
MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9);
|
|
198
|
+
MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14);
|
|
199
|
+
MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20);
|
|
200
|
+
MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5);
|
|
201
|
+
MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9);
|
|
202
|
+
MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14);
|
|
203
|
+
MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20);
|
|
204
|
+
|
|
205
|
+
MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4);
|
|
206
|
+
MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11);
|
|
207
|
+
MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16);
|
|
208
|
+
MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23);
|
|
209
|
+
MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4);
|
|
210
|
+
MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11);
|
|
211
|
+
MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16);
|
|
212
|
+
MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23);
|
|
213
|
+
MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4);
|
|
214
|
+
MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11);
|
|
215
|
+
MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16);
|
|
216
|
+
MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23);
|
|
217
|
+
MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4);
|
|
218
|
+
MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11);
|
|
219
|
+
MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16);
|
|
220
|
+
MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23);
|
|
221
|
+
|
|
222
|
+
MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6);
|
|
223
|
+
MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10);
|
|
224
|
+
MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15);
|
|
225
|
+
MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21);
|
|
226
|
+
MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6);
|
|
227
|
+
MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10);
|
|
228
|
+
MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15);
|
|
229
|
+
MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21);
|
|
230
|
+
MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6);
|
|
231
|
+
MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10);
|
|
232
|
+
MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15);
|
|
233
|
+
MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21);
|
|
234
|
+
MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6);
|
|
235
|
+
MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10);
|
|
236
|
+
MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15);
|
|
237
|
+
MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21);
|
|
238
|
+
|
|
239
|
+
buf[0] += a;
|
|
240
|
+
buf[1] += b;
|
|
241
|
+
buf[2] += c;
|
|
242
|
+
buf[3] += d;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
#endif
|
|
246
|
+
|
|
247
|
+
QT_END_NAMESPACE
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This is the header file for the MD5 message-digest algorithm.
|
|
3
|
+
* The algorithm is due to Ron Rivest. This code was
|
|
4
|
+
* written by Colin Plumb in 1993, no copyright is claimed.
|
|
5
|
+
* This code is in the public domain; do with it what you wish.
|
|
6
|
+
*
|
|
7
|
+
* Equivalent code is available from RSA Data Security, Inc.
|
|
8
|
+
* This code has been tested against that, and is equivalent,
|
|
9
|
+
* except that you don't need to include two pages of legalese
|
|
10
|
+
* with every copy.
|
|
11
|
+
*
|
|
12
|
+
* To compute the message digest of a chunk of bytes, declare an
|
|
13
|
+
* MD5Context structure, pass it to MD5Init, call MD5Update as
|
|
14
|
+
* needed on buffers full of bytes, and then call MD5Final, which
|
|
15
|
+
* will fill a supplied 16-byte array with the digest.
|
|
16
|
+
*
|
|
17
|
+
* Changed so as no longer to depend on Colin Plumb's `usual.h'
|
|
18
|
+
* header definitions; now uses stuff from dpkg's config.h
|
|
19
|
+
* - Ian Jackson <ian@chiark.greenend.org.uk>.
|
|
20
|
+
* Still in the public domain.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
#ifndef MD5_H
|
|
24
|
+
#define MD5_H
|
|
25
|
+
|
|
26
|
+
#include <qglobal.h>
|
|
27
|
+
#include <qbytearray.h>
|
|
28
|
+
#include <qstring.h>
|
|
29
|
+
|
|
30
|
+
QT_BEGIN_NAMESPACE
|
|
31
|
+
|
|
32
|
+
typedef unsigned char md5byte;
|
|
33
|
+
typedef quint32 UWORD32;
|
|
34
|
+
|
|
35
|
+
struct MD5Context {
|
|
36
|
+
UWORD32 buf[4];
|
|
37
|
+
UWORD32 bytes[2];
|
|
38
|
+
UWORD32 in[16];
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
static void MD5Init(struct MD5Context *context);
|
|
42
|
+
static void MD5Update(struct MD5Context *context, md5byte const *buf, unsigned len);
|
|
43
|
+
static void MD5Final(struct MD5Context *context, unsigned char digest[16]);
|
|
44
|
+
static void MD5Transform(UWORD32 buf[4], UWORD32 const in[16]);
|
|
45
|
+
|
|
46
|
+
QT_END_NAMESPACE
|
|
47
|
+
|
|
48
|
+
#endif /* !MD5_H */
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
PCRE LICENCE
|
|
2
|
+
------------
|
|
3
|
+
|
|
4
|
+
PCRE is a library of functions to support regular expressions whose syntax
|
|
5
|
+
and semantics are as close as possible to those of the Perl 5 language.
|
|
6
|
+
|
|
7
|
+
Release 8 of PCRE is distributed under the terms of the "BSD" licence, as
|
|
8
|
+
specified below. The documentation for PCRE, supplied in the "doc"
|
|
9
|
+
directory, is distributed under the same terms as the software itself. The data
|
|
10
|
+
in the testdata directory is not copyrighted and is in the public domain.
|
|
11
|
+
|
|
12
|
+
The basic library functions are written in C and are freestanding. Also
|
|
13
|
+
included in the distribution is a set of C++ wrapper functions, and a
|
|
14
|
+
just-in-time compiler that can be used to optimize pattern matching. These
|
|
15
|
+
are both optional features that can be omitted when the library is built.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
THE BASIC LIBRARY FUNCTIONS
|
|
19
|
+
---------------------------
|
|
20
|
+
|
|
21
|
+
Written by: Philip Hazel
|
|
22
|
+
Email local part: ph10
|
|
23
|
+
Email domain: cam.ac.uk
|
|
24
|
+
|
|
25
|
+
University of Cambridge Computing Service,
|
|
26
|
+
Cambridge, England.
|
|
27
|
+
|
|
28
|
+
Copyright (c) 1997-2016 University of Cambridge
|
|
29
|
+
All rights reserved.
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
PCRE JUST-IN-TIME COMPILATION SUPPORT
|
|
33
|
+
-------------------------------------
|
|
34
|
+
|
|
35
|
+
Written by: Zoltan Herczeg
|
|
36
|
+
Email local part: hzmester
|
|
37
|
+
Emain domain: freemail.hu
|
|
38
|
+
|
|
39
|
+
Copyright(c) 2010-2016 Zoltan Herczeg
|
|
40
|
+
All rights reserved.
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
STACK-LESS JUST-IN-TIME COMPILER
|
|
44
|
+
--------------------------------
|
|
45
|
+
|
|
46
|
+
Written by: Zoltan Herczeg
|
|
47
|
+
Email local part: hzmester
|
|
48
|
+
Emain domain: freemail.hu
|
|
49
|
+
|
|
50
|
+
Copyright(c) 2009-2016 Zoltan Herczeg
|
|
51
|
+
All rights reserved.
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
THE C++ WRAPPER FUNCTIONS
|
|
55
|
+
-------------------------
|
|
56
|
+
|
|
57
|
+
Contributed by: Google Inc.
|
|
58
|
+
|
|
59
|
+
Copyright (c) 2007-2012, Google Inc.
|
|
60
|
+
All rights reserved.
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
THE "BSD" LICENCE
|
|
64
|
+
-----------------
|
|
65
|
+
|
|
66
|
+
Redistribution and use in source and binary forms, with or without
|
|
67
|
+
modification, are permitted provided that the following conditions are met:
|
|
68
|
+
|
|
69
|
+
* Redistributions of source code must retain the above copyright notice,
|
|
70
|
+
this list of conditions and the following disclaimer.
|
|
71
|
+
|
|
72
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
73
|
+
notice, this list of conditions and the following disclaimer in the
|
|
74
|
+
documentation and/or other materials provided with the distribution.
|
|
75
|
+
|
|
76
|
+
* Neither the name of the University of Cambridge nor the name of Google
|
|
77
|
+
Inc. nor the names of their contributors may be used to endorse or
|
|
78
|
+
promote products derived from this software without specific prior
|
|
79
|
+
written permission.
|
|
80
|
+
|
|
81
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
82
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
83
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
84
|
+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
85
|
+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
86
|
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
87
|
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
88
|
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
89
|
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
90
|
+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
91
|
+
POSSIBILITY OF SUCH DAMAGE.
|
|
92
|
+
|
|
93
|
+
End
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
diff --git a/src/3rdparty/rfc6234/sha384-512.c b/src/3rdparty/rfc6234/sha384-512.c
|
|
2
|
+
index 7d9ba3f..b2fcf03 100644
|
|
3
|
+
--- a/src/3rdparty/rfc6234/sha384-512.c
|
|
4
|
+
+++ b/src/3rdparty/rfc6234/sha384-512.c
|
|
5
|
+
@@ -320,14 +320,14 @@ static int SHA384_512ResultN(SHA512Context *context,
|
|
6
|
+
|
|
7
|
+
/* Initial Hash Values: FIPS 180-3 sections 5.3.4 and 5.3.5 */
|
|
8
|
+
static uint64_t SHA384_H0[ ] = {
|
|
9
|
+
- 0xCBBB9D5DC1059ED8ll, 0x629A292A367CD507ll, 0x9159015A3070DD17ll,
|
|
10
|
+
- 0x152FECD8F70E5939ll, 0x67332667FFC00B31ll, 0x8EB44A8768581511ll,
|
|
11
|
+
- 0xDB0C2E0D64F98FA7ll, 0x47B5481DBEFA4FA4ll
|
|
12
|
+
+ 0xCBBB9D5DC1059ED8ull, 0x629A292A367CD507ull, 0x9159015A3070DD17ull,
|
|
13
|
+
+ 0x152FECD8F70E5939ull, 0x67332667FFC00B31ull, 0x8EB44A8768581511ull,
|
|
14
|
+
+ 0xDB0C2E0D64F98FA7ull, 0x47B5481DBEFA4FA4ull
|
|
15
|
+
};
|
|
16
|
+
static uint64_t SHA512_H0[ ] = {
|
|
17
|
+
- 0x6A09E667F3BCC908ll, 0xBB67AE8584CAA73Bll, 0x3C6EF372FE94F82Bll,
|
|
18
|
+
- 0xA54FF53A5F1D36F1ll, 0x510E527FADE682D1ll, 0x9B05688C2B3E6C1Fll,
|
|
19
|
+
- 0x1F83D9ABFB41BD6Bll, 0x5BE0CD19137E2179ll
|
|
20
|
+
+ 0x6A09E667F3BCC908ull, 0xBB67AE8584CAA73Bull, 0x3C6EF372FE94F82Bull,
|
|
21
|
+
+ 0xA54FF53A5F1D36F1ull, 0x510E527FADE682D1ull, 0x9B05688C2B3E6C1Full,
|
|
22
|
+
+ 0x1F83D9ABFB41BD6Bull, 0x5BE0CD19137E2179ull
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
#endif /* USE_32BIT_ONLY */
|
|
26
|
+
@@ -766,33 +766,33 @@ static void SHA384_512ProcessMessageBlock(SHA512Context *context)
|
|
27
|
+
#else /* !USE_32BIT_ONLY */
|
|
28
|
+
/* Constants defined in FIPS 180-3, section 4.2.3 */
|
|
29
|
+
static const uint64_t K[80] = {
|
|
30
|
+
- 0x428A2F98D728AE22ll, 0x7137449123EF65CDll, 0xB5C0FBCFEC4D3B2Fll,
|
|
31
|
+
- 0xE9B5DBA58189DBBCll, 0x3956C25BF348B538ll, 0x59F111F1B605D019ll,
|
|
32
|
+
- 0x923F82A4AF194F9Bll, 0xAB1C5ED5DA6D8118ll, 0xD807AA98A3030242ll,
|
|
33
|
+
- 0x12835B0145706FBEll, 0x243185BE4EE4B28Cll, 0x550C7DC3D5FFB4E2ll,
|
|
34
|
+
- 0x72BE5D74F27B896Fll, 0x80DEB1FE3B1696B1ll, 0x9BDC06A725C71235ll,
|
|
35
|
+
- 0xC19BF174CF692694ll, 0xE49B69C19EF14AD2ll, 0xEFBE4786384F25E3ll,
|
|
36
|
+
- 0x0FC19DC68B8CD5B5ll, 0x240CA1CC77AC9C65ll, 0x2DE92C6F592B0275ll,
|
|
37
|
+
- 0x4A7484AA6EA6E483ll, 0x5CB0A9DCBD41FBD4ll, 0x76F988DA831153B5ll,
|
|
38
|
+
- 0x983E5152EE66DFABll, 0xA831C66D2DB43210ll, 0xB00327C898FB213Fll,
|
|
39
|
+
- 0xBF597FC7BEEF0EE4ll, 0xC6E00BF33DA88FC2ll, 0xD5A79147930AA725ll,
|
|
40
|
+
- 0x06CA6351E003826Fll, 0x142929670A0E6E70ll, 0x27B70A8546D22FFCll,
|
|
41
|
+
- 0x2E1B21385C26C926ll, 0x4D2C6DFC5AC42AEDll, 0x53380D139D95B3DFll,
|
|
42
|
+
- 0x650A73548BAF63DEll, 0x766A0ABB3C77B2A8ll, 0x81C2C92E47EDAEE6ll,
|
|
43
|
+
- 0x92722C851482353Bll, 0xA2BFE8A14CF10364ll, 0xA81A664BBC423001ll,
|
|
44
|
+
- 0xC24B8B70D0F89791ll, 0xC76C51A30654BE30ll, 0xD192E819D6EF5218ll,
|
|
45
|
+
- 0xD69906245565A910ll, 0xF40E35855771202All, 0x106AA07032BBD1B8ll,
|
|
46
|
+
- 0x19A4C116B8D2D0C8ll, 0x1E376C085141AB53ll, 0x2748774CDF8EEB99ll,
|
|
47
|
+
- 0x34B0BCB5E19B48A8ll, 0x391C0CB3C5C95A63ll, 0x4ED8AA4AE3418ACBll,
|
|
48
|
+
- 0x5B9CCA4F7763E373ll, 0x682E6FF3D6B2B8A3ll, 0x748F82EE5DEFB2FCll,
|
|
49
|
+
- 0x78A5636F43172F60ll, 0x84C87814A1F0AB72ll, 0x8CC702081A6439ECll,
|
|
50
|
+
- 0x90BEFFFA23631E28ll, 0xA4506CEBDE82BDE9ll, 0xBEF9A3F7B2C67915ll,
|
|
51
|
+
- 0xC67178F2E372532Bll, 0xCA273ECEEA26619Cll, 0xD186B8C721C0C207ll,
|
|
52
|
+
- 0xEADA7DD6CDE0EB1Ell, 0xF57D4F7FEE6ED178ll, 0x06F067AA72176FBAll,
|
|
53
|
+
- 0x0A637DC5A2C898A6ll, 0x113F9804BEF90DAEll, 0x1B710B35131C471Bll,
|
|
54
|
+
- 0x28DB77F523047D84ll, 0x32CAAB7B40C72493ll, 0x3C9EBE0A15C9BEBCll,
|
|
55
|
+
- 0x431D67C49C100D4Cll, 0x4CC5D4BECB3E42B6ll, 0x597F299CFC657E2All,
|
|
56
|
+
- 0x5FCB6FAB3AD6FAECll, 0x6C44198C4A475817ll
|
|
57
|
+
+ 0x428A2F98D728AE22ull, 0x7137449123EF65CDull, 0xB5C0FBCFEC4D3B2Full,
|
|
58
|
+
+ 0xE9B5DBA58189DBBCull, 0x3956C25BF348B538ull, 0x59F111F1B605D019ull,
|
|
59
|
+
+ 0x923F82A4AF194F9Bull, 0xAB1C5ED5DA6D8118ull, 0xD807AA98A3030242ull,
|
|
60
|
+
+ 0x12835B0145706FBEull, 0x243185BE4EE4B28Cull, 0x550C7DC3D5FFB4E2ull,
|
|
61
|
+
+ 0x72BE5D74F27B896Full, 0x80DEB1FE3B1696B1ull, 0x9BDC06A725C71235ull,
|
|
62
|
+
+ 0xC19BF174CF692694ull, 0xE49B69C19EF14AD2ull, 0xEFBE4786384F25E3ull,
|
|
63
|
+
+ 0x0FC19DC68B8CD5B5ull, 0x240CA1CC77AC9C65ull, 0x2DE92C6F592B0275ull,
|
|
64
|
+
+ 0x4A7484AA6EA6E483ull, 0x5CB0A9DCBD41FBD4ull, 0x76F988DA831153B5ull,
|
|
65
|
+
+ 0x983E5152EE66DFABull, 0xA831C66D2DB43210ull, 0xB00327C898FB213Full,
|
|
66
|
+
+ 0xBF597FC7BEEF0EE4ull, 0xC6E00BF33DA88FC2ull, 0xD5A79147930AA725ull,
|
|
67
|
+
+ 0x06CA6351E003826Full, 0x142929670A0E6E70ull, 0x27B70A8546D22FFCull,
|
|
68
|
+
+ 0x2E1B21385C26C926ull, 0x4D2C6DFC5AC42AEDull, 0x53380D139D95B3DFull,
|
|
69
|
+
+ 0x650A73548BAF63DEull, 0x766A0ABB3C77B2A8ull, 0x81C2C92E47EDAEE6ull,
|
|
70
|
+
+ 0x92722C851482353Bull, 0xA2BFE8A14CF10364ull, 0xA81A664BBC423001ull,
|
|
71
|
+
+ 0xC24B8B70D0F89791ull, 0xC76C51A30654BE30ull, 0xD192E819D6EF5218ull,
|
|
72
|
+
+ 0xD69906245565A910ull, 0xF40E35855771202Aull, 0x106AA07032BBD1B8ull,
|
|
73
|
+
+ 0x19A4C116B8D2D0C8ull, 0x1E376C085141AB53ull, 0x2748774CDF8EEB99ull,
|
|
74
|
+
+ 0x34B0BCB5E19B48A8ull, 0x391C0CB3C5C95A63ull, 0x4ED8AA4AE3418ACBull,
|
|
75
|
+
+ 0x5B9CCA4F7763E373ull, 0x682E6FF3D6B2B8A3ull, 0x748F82EE5DEFB2FCull,
|
|
76
|
+
+ 0x78A5636F43172F60ull, 0x84C87814A1F0AB72ull, 0x8CC702081A6439ECull,
|
|
77
|
+
+ 0x90BEFFFA23631E28ull, 0xA4506CEBDE82BDE9ull, 0xBEF9A3F7B2C67915ull,
|
|
78
|
+
+ 0xC67178F2E372532Bull, 0xCA273ECEEA26619Cull, 0xD186B8C721C0C207ull,
|
|
79
|
+
+ 0xEADA7DD6CDE0EB1Eull, 0xF57D4F7FEE6ED178ull, 0x06F067AA72176FBAull,
|
|
80
|
+
+ 0x0A637DC5A2C898A6ull, 0x113F9804BEF90DAEull, 0x1B710B35131C471Bull,
|
|
81
|
+
+ 0x28DB77F523047D84ull, 0x32CAAB7B40C72493ull, 0x3C9EBE0A15C9BEBCull,
|
|
82
|
+
+ 0x431D67C49C100D4Cull, 0x4CC5D4BECB3E42B6ull, 0x597F299CFC657E2Aull,
|
|
83
|
+
+ 0x5FCB6FAB3AD6FAECull, 0x6C44198C4A475817ull
|
|
84
|
+
};
|
|
85
|
+
int t, t8; /* Loop counter */
|
|
86
|
+
uint64_t temp1, temp2; /* Temporary word value */
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/************************ sha-private.h ************************/
|
|
2
|
+
/***************** See RFC 6234 for details. *******************/
|
|
3
|
+
#ifndef _SHA_PRIVATE__H
|
|
4
|
+
#define _SHA_PRIVATE__H
|
|
5
|
+
/*
|
|
6
|
+
* These definitions are defined in FIPS 180-3, section 4.1.
|
|
7
|
+
* Ch() and Maj() are defined identically in sections 4.1.1,
|
|
8
|
+
* 4.1.2, and 4.1.3.
|
|
9
|
+
*
|
|
10
|
+
* The definitions used in FIPS 180-3 are as follows:
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
#ifndef USE_MODIFIED_MACROS
|
|
14
|
+
#define SHA_Ch(x,y,z) (((x) & (y)) ^ ((~(x)) & (z)))
|
|
15
|
+
#define SHA_Maj(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))
|
|
16
|
+
#else /* USE_MODIFIED_MACROS */
|
|
17
|
+
/*
|
|
18
|
+
* The following definitions are equivalent and potentially faster.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
#define SHA_Ch(x, y, z) (((x) & ((y) ^ (z))) ^ (z))
|
|
22
|
+
#define SHA_Maj(x, y, z) (((x) & ((y) | (z))) | ((y) & (z)))
|
|
23
|
+
|
|
24
|
+
#endif /* USE_MODIFIED_MACROS */
|
|
25
|
+
|
|
26
|
+
#define SHA_Parity(x, y, z) ((x) ^ (y) ^ (z))
|
|
27
|
+
|
|
28
|
+
#endif /* _SHA_PRIVATE__H */
|