Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
S
Synchronization_of_threads
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yazan.halloul
Synchronization_of_threads
Commits
e3949f82
Commit
e3949f82
authored
Nov 28, 2023
by
yazan.halloul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test DES Algorithm Class
parent
a5c00a27
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
29 additions
and
0 deletions
+29
-0
pom.xml
pom.xml
+8
-0
DESTest.java
src/test/java/DESTest.java
+21
-0
DESAlgorithm.class
target/classes/benefit_classes/DESAlgorithm.class
+0
-0
LineSequence.class
target/classes/benefit_classes/LineSequence.class
+0
-0
LineSequenceComparator.class
target/classes/benefit_classes/LineSequenceComparator.class
+0
-0
Main.class
target/classes/org/example/Main.class
+0
-0
DESTest.class
target/test-classes/DESTest.class
+0
-0
No files found.
pom.xml
View file @
e3949f82
...
...
@@ -7,6 +7,14 @@
<groupId>
org.example
</groupId>
<artifactId>
Yazan_Sync_Thread
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<dependencies>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
3.8.2
</version>
<scope>
test
</scope>
</dependency>
</dependencies>
<properties>
<maven.compiler.source>
17
</maven.compiler.source>
...
...
src/test/java/DESTest.java
0 → 100644
View file @
e3949f82
import
junit.framework.TestCase
;
import
benefit_classes.DESAlgorithm
;
import
javax.crypto.BadPaddingException
;
import
javax.crypto.IllegalBlockSizeException
;
import
javax.crypto.NoSuchPaddingException
;
import
java.io.UnsupportedEncodingException
;
import
java.security.InvalidKeyException
;
import
java.security.NoSuchAlgorithmException
;
public
class
DESTest
extends
TestCase
{
DESAlgorithm
desAlgorithm
=
new
DESAlgorithm
(
"fzI0SlHWAfc="
);
public
void
testEncryptionAndDecryption
()
throws
NoSuchPaddingException
,
UnsupportedEncodingException
,
IllegalBlockSizeException
,
NoSuchAlgorithmException
,
BadPaddingException
,
InvalidKeyException
{
String
text
=
"input text to test encryption"
;
String
encryptedText
=
desAlgorithm
.
encryption
(
text
);
String
decryptedText
=
desAlgorithm
.
decryption
(
encryptedText
);
assertEquals
(
text
,
decryptedText
);
}
}
target/classes/benefit_classes/DESAlgorithm.class
0 → 100644
View file @
e3949f82
File added
target/classes/benefit_classes/LineSequence.class
0 → 100644
View file @
e3949f82
File added
target/classes/benefit_classes/LineSequenceComparator.class
0 → 100644
View file @
e3949f82
File added
target/classes/org/example/Main.class
0 → 100644
View file @
e3949f82
File added
target/test-classes/DESTest.class
0 → 100644
View file @
e3949f82
File added
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment