Beispiel #1
0
        public void XTeaEncryption_Validation_WrongKeySize()
        {
            var encryptedMessage = PseudoXTea.EncryptXtea(_referenceEncryptedMessage, new uint[] { 0, 0, 0 });

            CollectionAssert.AreEqual(encryptedMessage, _referenceEncryptedMessage);
        }
Beispiel #2
0
        public void XTeaEncryption_Validation_WrongBlockSize()
        {
            var encryptedMessage = PseudoXTea.EncryptXtea(new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, _referenceEncryptionKey);

            CollectionAssert.AreEqual(encryptedMessage, _referenceEncryptedMessage);
        }
Beispiel #3
0
        public void XTeaDecryption_Validation()
        {
            var decryptedMsg = PseudoXTea.DecryptXtea(_referenceEncryptedMessage, _referenceEncryptionKey);

            CollectionAssert.AreEqual(decryptedMsg, _referenceMessageToEncrypt);
        }
Beispiel #4
0
        public void XTeaEncryption_Validation_EmptyMessage()
        {
            var encryptedMessage = PseudoXTea.EncryptXtea(new byte[] {}, _referenceEncryptionKey);

            CollectionAssert.AreEqual(encryptedMessage, _referenceEncryptedMessage);
        }
Beispiel #5
0
        public void XTeaEncryption_Validation()
        {
            var encryptedMessage = PseudoXTea.EncryptXtea(_referenceMessageToEncrypt, _referenceEncryptionKey);

            CollectionAssert.AreEqual(encryptedMessage, _referenceEncryptedMessage);
        }