public void UnusualChars()
 {
     var encryptor = new TripleDesStringEncryptor();
     var encrypted = encryptor.EncryptString("!@#$%^&*()- +=");
     var decrypted = encryptor.DecryptString(encrypted);
     Assert.AreEqual("!@#$%^&*()- +=", decrypted);
 }
 public void SimpleWordDecryptsToSameValueEncrypted()
 {
     var encryptor = new TripleDesStringEncryptor();
     var encrypted = encryptor.EncryptString("password");
     var decrypted = encryptor.DecryptString(encrypted);
     Assert.AreEqual("password", decrypted);
 }
Пример #3
0
        public MainForm()
        {
            _settings = ExtruderSettings.GetAppSettings();
            _encryptor = new TripleDesStringEncryptor();

            InitializeComponent();

            DeviceConnectedOrDisconnected();
            RefreshConnectText(ConnectionState.Disconnected);

            InitializeSettingsPage();
            InitializePages();

            SubscribeEvents();
        }
Пример #4
0
 public SettingsPage()
 {
     InitializeComponent();
     
     _encryptor = new TripleDesStringEncryptor();
 }
 public void SimpleWordEncryptsToKnownValue()
 {
     var encryptor = new TripleDesStringEncryptor();
     var encrypted = encryptor.EncryptString("password");
     Assert.AreEqual("wwwfBrRRCDxe3qSYCrri3w==", encrypted);
 }