Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Competition 1 - CodeCracker
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ricardo Garcia
Competition 1 - CodeCracker
Commits
293ea700
Commit
293ea700
authored
2 years ago
by
Ricy40
Browse files
Options
Downloads
Patches
Plain Diff
Edits
parent
fdb7c6f5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/com/ricy/CodeCracker.java
+1
-6
1 addition, 6 deletions
src/main/java/com/ricy/CodeCracker.java
target/classes/com/ricy/CodeCracker.class
+0
-0
0 additions, 0 deletions
target/classes/com/ricy/CodeCracker.class
with
1 addition
and
6 deletions
src/main/java/com/ricy/CodeCracker.java
+
1
−
6
View file @
293ea700
...
@@ -32,14 +32,9 @@ public class CodeCracker {
...
@@ -32,14 +32,9 @@ public class CodeCracker {
if
(
subtextMap
.
getLeft
().
equals
(
phraseMap
.
getLeft
()))
{
if
(
subtextMap
.
getLeft
().
equals
(
phraseMap
.
getLeft
()))
{
System
.
out
.
println
(
"Found!"
);
System
.
out
.
println
(
"Found!"
);
HashBiMap
<
Character
,
Integer
>
numKey
=
phraseMap
.
getRight
();
numKey
.
put
(
'Q'
,
25
);
// Q is not in the phrase
HashBiMap
<
Character
,
Integer
>
subtextKey
=
subtextMap
.
getRight
();
subtextKey
.
put
(
'M'
,
25
);
// M isn't in the corresponding part of ciphertext
HashBiMap
<
Character
,
Character
>
key
=
HashBiMap
.
create
();
HashBiMap
<
Character
,
Character
>
key
=
HashBiMap
.
create
();
for
(
int
num
=
0
;
num
<
26
;
num
++)
{
for
(
int
num
=
0
;
num
<
26
;
num
++)
{
key
.
put
(
subtext
Key
.
inverse
().
get
(
num
),
numKey
.
inverse
().
get
(
num
));
key
.
put
(
subtext
Map
.
getRight
()
.
inverse
().
get
(
num
),
phraseMap
.
getRight
()
.
inverse
().
get
(
num
));
}
}
ArrayList
<
String
>
plaintext
=
new
ArrayList
<>();
ArrayList
<
String
>
plaintext
=
new
ArrayList
<>();
...
...
This diff is collapsed.
Click to expand it.
target/classes/com/ricy/CodeCracker.class
+
0
−
0
View file @
293ea700
No preview for this file type
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment