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

            CollectionAssert.AreEqual(encryptedMessage, _referenceEncryptedMessage);
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
        public void XTeaDecryption_Validation()
        {
            var decryptedMsg = PseudoXTea.DecryptXtea(_referenceEncryptedMessage, _referenceEncryptionKey);

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

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

            CollectionAssert.AreEqual(encryptedMessage, _referenceEncryptedMessage);
        }