[OpenIndiana-discuss] Compiling KeepassXC on Hipster
bentahyr at chez.com
bentahyr at chez.com
Mon Dec 3 21:38:37 UTC 2018
This is not perfect, this is what's left to do :
- 64bits keepassxc and libargon2
- autotype doesn't work, option (menu entries, shortcut) not present
libargon2 compiles out of the box
https://github.com/P-H-C/phc-winner-argon2
cmake :
- cmake linker flags -lsocket -lnsl -lrt -lresolv
- cmake didn't find QT5 config utilities, I had to point it to the
directory
- did compilation with GCC7 but I think default GCC6 should work as well
- due to GCC7, I added -I /usr/gcc/7/include/c++/7.3.0 to CXX_FLAGS
keepassxc patch :
==== cut here ====
--- src/totp/totp.cpp 2018-08-23 03:25:04.000000000 +0000
+++ src/totp/totp.cpp.mod 2018-12-04 09:09:32.413168641 +0000
@@ -164,7 +164,7 @@
direction = 1;
startpos = 0;
}
- quint32 digitsPower = pow(encoder.alphabet.size(), digits);
+ quint32 digitsPower = pow(double (encoder.alphabet.size()),
digits);
quint64 password = binary % digitsPower;
QString retval(int(digits), encoder.alphabet[0]);
==== cut here ====
Best regards.
Ben
On 04/12/2018 09:29, Till Wegmüller wrote:
> Nice work.
>
> I would also be interested in it.
>
> Could you Publish a patch or put a makefile into OI Userland?
>
> Thanks and Greetings
> Till
> On 12/03/18 09:28 PM, bentahyr at chez.com wrote:
>
> Thanks Bob and Alexander, I think I start to understand.
>
> grep digits ../../src/totp/totp.cpp
> [...]
> quint8 digits = encoder.digits == 0 ? numDigits : encoder.digits;
> [...]
>
> From my 30 years old rusty knowledge of C++, this mean that digits is
> supposed to be a 'quint8' which is most probably QT version of the
> 'int'
> and as Bob noticed the pow function expects 'int', 'float', or 'double'
>
> From Alexander reference, I should have
> quint32 digitsPower = pow(encoder.alphabet.size(), int(digits));
>
> In that particular case it was 'encoder.alphabet.size()' which
> appeared
> ambiguous, using 'double (encoder.alphabet.size())' made it. 'digits'
> was ok so far
>
> Bottom line is I could compile and execute it, it is nice to have it
> native (works with wine).
>
> Thanks both of you.
> Best regards.
> Ben
>
> On 04/12/2018 03:21, Bob Friesenhahn wrote:
>
> On Mon, 3 Dec 2018, bentahyr at chez.com wrote:
>
> Hello,
> 'static QString Totp::generateTotp(QByteArray, quint64, quint8,
> quint8)':
> /home/ben/tmp/keepassxc-2.3.4/src/totp/totp.cpp:167:62: error: call
> of overloaded 'pow(int, quint8&)' is ambiguous
> quint32 digitsPower = pow(encoder.alphabet.size(), digits);
>
> What is the declared storage type of the 'digits' argument? From
> reading the header, it appears that it must be of type 'int', 'float',
> or 'double'. Any other type would require a type transformation which
> might be ambiguous.
>
> Bob
_______________________________________________
openindiana-discuss mailing list
openindiana-discuss at openindiana.org
https://openindiana.org/mailman/listinfo/openindiana-discuss
_______________________________________________
openindiana-discuss mailing list
openindiana-discuss at openindiana.org
https://openindiana.org/mailman/listinfo/openindiana-discuss
More information about the openindiana-discuss
mailing list