Imported Upstream version 3.1.20

parent 5ed773d3
......@@ -12,3 +12,15 @@ object_script.yubikey-personalization-gui.Release
yubikey-personalization-gui-*.tar.gz
yubikey-personalization-gui-*.tar.gz.sig
.DS_Store
lib/debug/
lib/release/
tests/tests.pro.user
lib/scanedit.o
lib/yubikeyutil.o
tests/moc_scanedittest.cpp
tests/moc_scanedittest.o
tests/scanedittest.o
tests/moc_yubikeyutiltest.cpp
tests/moc_yubikeyutiltest.o
tests/test.o
tests/yubikeyutiltest.o
language: cpp
compiler:
- gcc
- clang
before_install:
- sudo add-apt-repository -y ppa:yubico/stable
- sudo apt-get update -qq
- sudo apt-get install -qq -y --no-install-recommends libyubikey-dev libykpers-1-dev qt4-qmake libqt4-dev
install:
- qmake 'CONFIG += debug'
- make all
script: make check
2015-04-01 Klas Lindfors <klas@yubico.com>
* NEWS: NEWS for 3.1.20
2015-04-01 Klas Lindfors <klas@yubico.com>
* do-source-release.sh: fixup release script
2015-04-01 Klas Lindfors <klas@yubico.com>
* src/src.pro: correct search path
2015-03-30 Klas Lindfors <klas@yubico.com>
* : update neo pictures
2015-03-30 Klas Lindfors <klas@yubico.com>
* : update plus pictures
2015-03-30 Klas Lindfors <klas@yubico.com>
* resources/resources.qrc, src/ui/mainwindow.cpp: add edge graphics
2015-03-30 Klas Lindfors <klas@yubico.com>
* lib/yubikeyutil.cpp, lib/yubikeyutil.h: drop unused hexdump
function
2015-03-30 Klas Lindfors <klas@yubico.com>
* tests/yubikeyutiltest.cpp, tests/yubikeyutiltest.h: adding test
that the random function returns different stuff
2015-03-30 Klas Lindfors <klas@yubico.com>
* src/yubikeyfinder.cpp: mark more ver 4 as not supporting ndef
2015-03-26 Klas Lindfors <klas@yubico.com>
* src/ui/chalresppage.cpp, src/ui/diagnostics.cpp,
src/ui/mainwindow.cpp, src/ui/oathpage.cpp, src/ui/otppage.cpp,
src/ui/settingpage.cpp, src/ui/staticpage.cpp, src/ui/toolpage.cpp:
add more includes
2015-03-26 Klas Lindfors <klas@yubico.com>
* .travis.yml: format changes
2015-03-26 Klas Lindfors <klas@yubico.com>
* .travis.yml: split travis script and install
2015-03-26 Klas Lindfors <klas@yubico.com>
* lib/yubikeyutil.cpp: simplify getNextModhex() by having it call
getNextHex() needs to do some coding-decoding, but less logic
2015-03-26 Klas Lindfors <klas@yubico.com>
* tests/yubikeyutiltest.cpp, tests/yubikeyutiltest.h: some tests for
getNextHex() and getNextModhex()
2015-03-26 Klas Lindfors <klas@yubico.com>
* lib/yubikeyutil.cpp: include QRegExp
2015-03-26 Klas Lindfors <klas@yubico.com>
* .gitignore, tests/scanedittest.cpp, tests/test.cpp,
tests/tests.pro, tests/yubikeyutiltest.cpp, tests/yubikeyutiltest.h:
refactor tests a bit so we can have several classes and add a simple test of YubikeyUtil
2015-03-26 Klas Lindfors <klas@yubico.com>
* lib/common.h, lib/yubikeyutil.cpp, src/ui/aboutpage.cpp,
src/ui/chalresppage.cpp, src/ui/confirmbox.cpp,
src/ui/diagnostics.cpp, src/ui/mainwindow.cpp, src/ui/oathpage.cpp,
src/ui/otppage.cpp, src/ui/settingpage.cpp, src/ui/staticpage.cpp,
src/ui/toolpage.cpp, src/ui/yubiaccbox.cpp, src/yubikeyconfig.cpp,
src/yubikeyconfig.h, src/yubikeyfinder.cpp, src/yubikeyfinder.h,
src/yubikeywriter.cpp: refactor so common.h pulls in less of qt
2015-03-25 Klas Lindfors <klas@yubico.com>
* .travis.yml: all needed before check
2015-03-25 Klas Lindfors <klas@yubico.com>
* .travis.yml: add travis.yml
2015-03-25 Klas Lindfors <klas@yubico.com>
* .gitignore: ignore
2015-03-25 Klas Lindfors <klas@yubico.com>
* lib/lib.pro, src/src.pro, tests/tests.pro: re-enable silent
compilation and add warn_on for debug
2015-03-24 Klas Lindfors <klas@yubico.com>
* .gitignore, YKPersonalization.pro, {src => lib}/common.h, {src =>
lib}/crandom.cpp, {src => lib}/crandom.h, lib/lib.pro, {src =>
lib}/otpdef.h, {src/ui => lib}/scanedit.cpp, {src/ui =>
lib}/scanedit.h, {src => lib}/yubikeyutil.cpp, {src =>
lib}/yubikeyutil.h, src/src.pro, tests/scanedittest.cpp,
tests/scanedittest.h, tests/tests.pro: refactor for testability, and
add a simple test this breaks the application up in a library part and an application
part, the library part is statically linked and pulled in for both
tests and the gui app.
2015-03-24 Klas Lindfors <klas@yubico.com>
* src/ui/scanedit.cpp: | was at wrong position so translation from scancode to text got wrong
2015-03-16 Klas Lindfors <klas@yubico.com>
* YKPersonalization.pro: switch timestamp url
2015-03-16 Klas Lindfors <klas@yubico.com>
* : new logo for installer
2015-03-16 Klas Lindfors <klas@yubico.com>
* : new logo
2015-03-16 Klas Lindfors <klas@yubico.com>
* src/version.h: bump copyrights for 2015
2015-03-13 Klas Lindfors <klas@yubico.com>
* NEWS, YKPersonalization.pro: bump versions
2015-03-13 Klas Lindfors <klas@yubico.com>
* NEWS: NEWS for 3.1.19
......
yubikey-personalization-gui NEWS -- History of user-visible changes. -*- outline -*-
* Version 3.1.20 (released 2015-04-01)
** Some new pictures.
** Add some simplistic unit tests.
** Fix bug with translation of | in scancode to text.
* Version 3.1.19 (released 2015-03-13)
** Remove build timestamp.
......
This diff is collapsed.
......@@ -16,16 +16,16 @@ if ! head -3 NEWS | grep -q "Version $VERSION .released `date -I`"; then
exit
fi
if ! head -10 YKPersonalization.pro | grep -q "VERSION_MAJOR.*= `echo $VERSION | cut -d. -f1`"; then
echo "You need to update version in YKPersonalization.pro"
if ! head -10 src/src.pro | grep -q "VERSION_MAJOR.*= `echo $VERSION | cut -d. -f1`"; then
echo "You need to update version in src/src.pro"
exit
fi
if ! head -10 YKPersonalization.pro | grep -q "VERSION_MINOR.*= `echo $VERSION | cut -d. -f2`"; then
echo "You need to update version in YKPersonalization.pro"
if ! head -10 src/src.pro | grep -q "VERSION_MINOR.*= `echo $VERSION | cut -d. -f2`"; then
echo "You need to update version in src/src.pro"
exit
fi
if ! head -10 YKPersonalization.pro | grep -q "VERSION_BUILD.*= `echo $VERSION | cut -d. -f3`"; then
echo "You need to update version in YKPersonalization.pro"
if ! head -10 src/src.pro | grep -q "VERSION_BUILD.*= `echo $VERSION | cut -d. -f3`"; then
echo "You need to update version in src/src.pro"
exit
fi
......
installer/win-nsis/yubico_logo.bmp

152 KB | W: | H:

installer/win-nsis/yubico_logo.bmp

129 KB | W: | H:

installer/win-nsis/yubico_logo.bmp
installer/win-nsis/yubico_logo.bmp
installer/win-nsis/yubico_logo.bmp
installer/win-nsis/yubico_logo.bmp
  • 2-up
  • Swipe
  • Onion skin
......@@ -29,11 +29,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef COMMON_H
#define COMMON_H
#include <QtGui>
#include "otpdef.h"
typedef std::vector<int>::size_type size_t;
//typedef std::vector<int>::size_type size_t;
enum AccMode {
Acc_None,
......
TEMPLATE = lib
CONFIG += exceptions staticlib
!nosilent {
CONFIG += silent
}
CONFIG(debug, debug|release) {
message("Debug build")
CONFIG += console no_lflags_merge warn_on
DESTDIR = debug/
} else {
message("Release build")
DEFINES += QT_NO_DEBUG_OUTPUT
DESTDIR = release/
}
HEADERS += \
scanedit.h \
common.h \
otpdef.h \
yubikeyutil.h
SOURCES += \
scanedit.cpp \
yubikeyutil.cpp
cross {
message("Doing a cross platform build..")
QMAKE_CXXFLAGS += $$(CXXFLAGS)
QMAKE_LFLAGS += $$(LDFLAGS)
# pickup compiler from environment
isEmpty(TARGET_ARCH) {
error("Cross compiling without a target is completely invalid, set TARGET_ARCH")
}
QMAKE_CC = $${TARGET_ARCH}-gcc
QMAKE_CXX = $${TARGET_ARCH}-g++
QMAKE_LINK = $$QMAKE_CXX
QMAKE_LINK_C = $$QMAKE_CC
win32 {
QMAKE_LIB = $${TARGET_ARCH}-ar -ru
QMAKE_RC = $${TARGET_ARCH}-windres $$quote(-DVERSION_WIN_STR=\'\\\"$${VERSION}\\0\\\"\')
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
QMAKE_UIC = $$[QT_INSTALL_BINS]/uic
QMAKE_IDC = $$[QT_INSTALL_BINS]/idc
QMAKE_RCC = $$[QT_INSTALL_BINS]/rcc
QMAKE_LFLAGS += -static-libstdc++ -static-libgcc
}
}
#
# Windows specific configuration
#
win32 {
HEADERS += crandom.h
SOURCES += crandom.cpp
INCLUDEPATH += ../libs/win32/include
}
macx:!force_pkgconfig {
INCLUDEPATH += ../libs/macx/include
CONFIG += x86_64
}
......@@ -275,8 +275,8 @@ static const char *usb2key2[] = {
"+",
"{",
"}",
"|",
"",
"|",
":",
"\"",
"~",
......
......@@ -28,6 +28,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "yubikeyutil.h"
#include <yubikey.h>
#include <QDebug>
#include <QRegExp>
#ifdef Q_OS_WIN
#include "crandom.h"
#endif
......@@ -341,65 +343,12 @@ QString YubiKeyUtil::getNextHex(size_t resultLen,
QString YubiKeyUtil::getNextModhex(size_t resultLen,
const QString &str, int scheme) {
QString result("");
qDebug() << "str = " << str
<< " len = " << str.length();
switch(scheme) {
case GEN_SCHEME_FIXED:
result = str;
break;
case GEN_SCHEME_INCR:
{
//Modhex clean
QString modhexStr(str);
qstrModhexClean(&modhexStr, resultLen);
//Modhex decode
unsigned char modhexDecoded[MAX_SIZE];
size_t modhexDecodedLen = 0;
memset(&modhexDecoded, 0, sizeof(modhexDecoded));
qstrModhexDecode(modhexDecoded, &modhexDecodedLen, modhexStr);
if(modhexDecodedLen <= 0) {
break;
}
qDebug() << "modhexDecoded = " << QString((char*)modhexDecoded)
<< " len = " << modhexDecodedLen;
//Increment
for (int i = modhexDecodedLen; i--; ) {
if (++modhexDecoded[i]) {
break;
}
}
//Modhex encode
result = qstrModhexEncode(modhexDecoded, modhexDecodedLen);
qDebug() << "modhexEncoded = " << result
<< " len = " << result.size();
}
break;
case GEN_SCHEME_RAND:
result = generateRandomModhex(resultLen);
break;
}
return result;
}
void YubiKeyUtil::hexdump(void *buffer, int size) {
unsigned char *p = (unsigned char *)buffer;
int i;
for (i = 0; i < size; i++) {
fprintf(stderr, "\\x%02x", *p);
p++;
}
fprintf(stderr, "\n");
fflush(stderr);
unsigned char result[resultLen];
size_t len;
QString hex;
qstrModhexDecode(result, &len, str);
hex = qstrHexEncode(result, len);
hex = getNextHex(resultLen, hex, scheme);
qstrHexDecode(result, &len, hex);
return qstrModhexEncode(result, len);
}
......@@ -92,9 +92,6 @@ public:
static QString getNextModhex(
size_t resultLen,
const QString &str, int scheme);
static void hexdump
(void *buffer, int size);
};
#endif // YUBIKEYUTIL_H
resources/images/logo.png

30.5 KB | W: | H:

resources/images/logo.png

3.06 KB | W: | H:

resources/images/logo.png
resources/images/logo.png
resources/images/logo.png
resources/images/logo.png
  • 2-up
  • Swipe
  • Onion skin
resources/images/neo_production.png

17.3 KB | W: | H:

resources/images/neo_production.png

16.2 KB | W: | H:

resources/images/neo_production.png
resources/images/neo_production.png
resources/images/neo_production.png
resources/images/neo_production.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -18,5 +18,6 @@
<file>images/neo_production.png</file>
<file>images/neo_production_33.mng</file>
<file>images/plus.mng</file>
<file>images/edge.mng</file>
</qresource>
</RCC>
This diff is collapsed.
......@@ -36,6 +36,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <ykpers-version.h>
#include <QUrl>
#include <QDesktopServices>
#include <QSignalMapper>
AboutPage::AboutPage(QWidget *parent) :
QWidget(parent),
ui(new Ui::AboutPage)
......
......@@ -35,6 +35,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "yubikeyutil.h"
#include "common.h"
#include <QSettings>
#include <QDateTime>
#include <QDebug>
#include <QSignalMapper>
#include <QTableWidgetItem>
ChalRespPage::ChalRespPage(QWidget *parent) :
QStackedWidget(parent),
ui(new Ui::ChalRespPage)
......
......@@ -30,6 +30,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ui_confirmbox.h"
#include <QMessageBox>
#include <QSettings>
#include "common.h"
......
......@@ -35,6 +35,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <ykpers-version.h>
#include <QDateTime>
#include <QDialogButtonBox>
Diagnostics::Diagnostics(QWidget *parent) :
QDialog(parent),
......
......@@ -42,6 +42,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ui/diagnostics.h"
#include "ui/helpbox.h"
#include <QMovie>
#include <QClipboard>
#include <QDebug>
#include <QSignalMapper>
#include <QSettings>
#include <QAction>
#include <QApplication>
#include "common.h"
#include "version.h"
......@@ -387,8 +395,7 @@ void MainWindow::keyFound(bool found, bool* featuresMatrix, int error) {
pixmap.load(":/res/images/v1-3-not-animated.png");
} else if(version < YK_VERSION(2,1,4)) {
movie->setFileName(":/res/images/V2-0-2-1-animated.mng");
} else if(version < YK_VERSION(2,2,0)) {
// YubiKey NEO
} else if(version < YK_VERSION(2,2,0)) { // NEO Beta
pixmap.load(":/res/images/neo_transparent.png");
} else if(version % 10 == 9){
pixmap.load(":/res/images/yubikey_devel.png");
......@@ -402,6 +409,8 @@ void MainWindow::keyFound(bool found, bool* featuresMatrix, int error) {
movie->setFileName(":/res/images/neo_production_33.mng");
} else if(version < YK_VERSION(4,1,0)) {
movie->setFileName(":/res/images/plus.mng");
} else if(version < YK_VERSION(4,2,0)) {
movie->setFileName(":/res/images/edge.mng");
} else {
pixmap.load(":/res/images/blank.png");
}
......
......@@ -34,6 +34,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ui/helpbox.h"
#include "ui/confirmbox.h"
#include <QDebug>
#include <QSignalMapper>
#include <QSettings>
#include <QDateTime>
#include <QTableWidgetItem>
#include <QRadioButton>
#define OATH_FIXED_NUMERIC 0
#define OATH_FIXED_MODHEX1 1
#define OATH_FIXED_MODHEX2 2
......
......@@ -35,6 +35,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ui/confirmbox.h"
#include <QDesktopServices>
#include <QDateTime>
#include <QDebug>
#include <QSignalMapper>
#include <QSettings>
#include <QUrl>
#include <QDir>
#include <QTableWidgetItem>
#include "common.h"
OtpPage::OtpPage(QWidget *parent) :
......
......@@ -37,6 +37,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <QFile>
#include <QMessageBox>
#include <QDebug>
#include <QSettings>
#include <QSignalMapper>
#include <QRegExpValidator>
#include "common.h"
......
......@@ -37,6 +37,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <QDesktopServices>
#include <QMessageBox>
#include <QDateTime>
#include <QDebug>
#include <QSettings>
#include <QSignalMapper>
#include <QRegExpValidator>
#include <QTableWidgetItem>
#include "common.h"
StaticPage::StaticPage(QWidget *parent) :
......
......@@ -40,6 +40,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "staticpage.h"
#include <QFileDialog>
#include <QDebug>
#include <QSettings>
#include <QSignalMapper>
#include <QClipboard>
#include <QApplication>
#include <ykpers.h>
#include <ykdef.h>
......
......@@ -36,6 +36,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <QSettings>
#include <QLineEdit>
#include <QSignalMapper>
#define CONFIG_PROTECTION_DISABLED 0
#define CONFIG_PROTECTION_ENABLE 1
......
/*
Copyright (C) 2011-2014 Yubico AB. All rights reserved.
Copyright (C) 2011-2015 Yubico AB. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
......@@ -34,7 +34,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define VER_FILEDESCRIPTION_STR "YubiKey Personalization Tool"
#define VER_INTERNALNAME_STR "YKPersonalization"
#define VER_LEGALCOPYRIGHT "Copyright © 2011-2014 Yubico"
#define VER_LEGALCOPYRIGHT "Copyright © 2011-2015 Yubico"
#define VER_LEGALTRADEMARKS1_STR "All Rights Reserved"
#define VER_ORIGINALFILENAME_STR "YKPersonalization.exe"
#define VER_PRODUCTNAME_STR "YKPersonalization"
......
......@@ -29,6 +29,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "yubikeyconfig.h"
#include "yubikeyutil.h"
#include <QSettings>
YubiKeyConfig::YubiKeyConfig() {
m_mode = Mode_YubicoOtp;
m_accMode = Acc_None;
......
......@@ -29,8 +29,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef YUBIKEYCONFIG_H
#define YUBIKEYCONFIG_H
#include <QString>
#include "common.h"
#include <QObject>
class YubiKeyConfig : public QObject
{
......
......@@ -31,8 +31,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <ykcore.h>
#include <ykdef.h>
#include <QTimer>
#include <QApplication>
#include <QDebug>
YubiKeyFinder* YubiKeyFinder::_instance = 0;
......@@ -69,7 +69,7 @@ const unsigned int YubiKeyFinder::FEATURE_MATRIX_EXCLUDE[][4] = {
{ 0, 0, 0, 0 }, //Feature_MovingFactor
{ 0, 0, 0, 0 }, //Feature_ChallengeResponseFixed
{ 0, 0, 0, 0 }, //Feature_Updatable
{ YK_VERSION(2,2,0), YK_VERSION(3,0,0), YK_VERSION(4,0,0), YK_VERSION(4,1,0) }, //Feature_Ndef
{ YK_VERSION(2,2,0), YK_VERSION(3,0,0), YK_VERSION(4,0,0), YK_VERSION(4,9,0) }, //Feature_Ndef
{ YK_VERSION(3,0,0), YK_VERSION(3,1,0), 0, 0 }, //Feature_LedInvert
{ 0, 0, 0, 0 }, //Feature_U2F
};
......
......@@ -30,6 +30,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define YUBIKEYFINDER_H
#include <QObject>
#include <QTimer>
extern "C" {
#include <ykpers.h>
......
......@@ -35,6 +35,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <ykdef.h>
#include <QFileDialog>
#include <QDebug>
#include <QSettings>
#define EXPORT_FILENAME_DEF "export.ycfg"
......
/*
Copyright (C) 2015 Yubico AB. All rights reserved.
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.
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
HOLDER 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.
*/
#include "scanedittest.h"
#include "scanedit.h"
void TestScanEdit::testCharacters() {
QString characters = "abcdefghijklmnopqrstuvwxyz1234567890\\n\\t -=[]\\\\;'`,./";
QString scancodes = ScanEdit::textToScanCodes(characters);
QString result = ScanEdit::scanCodesToText(scancodes);
QCOMPARE(result, characters);
}
void TestScanEdit::testCharacters2() {
QString characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_+{}|:\"~<>?";
QString scancodes = ScanEdit::textToScanCodes(characters);
QString result = ScanEdit::scanCodesToText(scancodes);
QCOMPARE(result, characters);
}
/*
Copyright (C) 2015 Yubico AB. All rights reserved.
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.
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
HOLDER 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