public void SimpleWordEncryptsToKnownValue()
        {
            var encryptor = new TripleDesStringEncryptor();
            var encrypted = encryptor.EncryptString("password");

            Assert.AreEqual("wwwfBrRRCDxe3qSYCrri3w==", encrypted);
        }
        public void SimpleWordDecryptsToSameValueEncrypted()
        {
            var encryptor = new TripleDesStringEncryptor();
            var encrypted = encryptor.EncryptString("password");
            var decrypted = encryptor.DecryptString(encrypted);

            Assert.AreEqual("password", decrypted);
        }
        public void UnusualChars()
        {
            var encryptor = new TripleDesStringEncryptor();
            var encrypted = encryptor.EncryptString("!@#$%^&*()- +=");
            var decrypted = encryptor.DecryptString(encrypted);

            Assert.AreEqual("!@#$%^&*()- +=", decrypted);
        }
Ejemplo n.º 4
0
        public MainForm()
        {
            _settings  = ExtruderSettings.GetAppSettings();
            _encryptor = new TripleDesStringEncryptor();

            InitializeComponent();

            DeviceConnectedOrDisconnected();
            RefreshConnectText(ConnectionState.Disconnected);

            InitializeSettingsPage();
            InitializePages();

            SubscribeEvents();
        }
Ejemplo n.º 5
0
        public SettingsPage()
        {
            InitializeComponent();

            _encryptor = new TripleDesStringEncryptor();
        }