Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FallIntoOblivion
Project
Overview
Details
Activity
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
Pedro Cavaleiro
FallIntoOblivion
Commits
0a69f66c
Commit
0a69f66c
authored
Dec 01, 2017
by
Pedro Cavaleiro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code rearranging, Code commenting, renaming methods to logical ones
parent
7a80299d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
Assinatura.java
FallIntoOblivion/src/fallintooblivion/Assinatura.java
+2
-2
FallIntoOblivion.java
FallIntoOblivion/src/fallintooblivion/FallIntoOblivion.java
+0
-0
Helpers.java
FallIntoOblivion/src/fallintooblivion/Helpers.java
+1
-1
No files found.
FallIntoOblivion/src/fallintooblivion/Assinatura.java
View file @
0a69f66c
...
@@ -45,7 +45,7 @@ public class Assinatura {
...
@@ -45,7 +45,7 @@ public class Assinatura {
* @throws IOException Excepção generica de input / output
* @throws IOException Excepção generica de input / output
* @throws SignatureException Excepção de assinatura
* @throws SignatureException Excepção de assinatura
*/
*/
public
void
gerarChaves
(
String
inFilePath
,
String
outSignature
,
String
outPK
)
throws
NoSuchAlgorithmException
,
InvalidKeyException
,
FileNotFoundException
,
IOException
,
SignatureException
{
public
void
assinarFicheiro
(
String
inFilePath
,
String
outSignature
,
String
outPK
)
throws
NoSuchAlgorithmException
,
InvalidKeyException
,
FileNotFoundException
,
IOException
,
SignatureException
{
signature
=
Signature
.
getInstance
(
"DSA"
);
signature
=
Signature
.
getInstance
(
"DSA"
);
KeyPairGenerator
kpg
=
KeyPairGenerator
.
getInstance
(
"DSA"
);
KeyPairGenerator
kpg
=
KeyPairGenerator
.
getInstance
(
"DSA"
);
SecureRandom
secureRan
=
new
SecureRandom
();
SecureRandom
secureRan
=
new
SecureRandom
();
...
@@ -95,7 +95,7 @@ public class Assinatura {
...
@@ -95,7 +95,7 @@ public class Assinatura {
* @throws FileNotFoundException Excepção para ficheiro não encontrado
* @throws FileNotFoundException Excepção para ficheiro não encontrado
* @throws Exception Excepção genérica
* @throws Exception Excepção genérica
*/
*/
public
boolean
verificaAssinatura
(
String
inFilePath
,
String
inSignature
,
String
inPK
)
throws
NoSuchAlgorithmException
,
InvalidKeyException
,
FileNotFoundException
,
Exception
{
public
boolean
verifica
r
Assinatura
(
String
inFilePath
,
String
inSignature
,
String
inPK
)
throws
NoSuchAlgorithmException
,
InvalidKeyException
,
FileNotFoundException
,
Exception
{
FileInputStream
keyfis
=
new
FileInputStream
(
inPK
);
FileInputStream
keyfis
=
new
FileInputStream
(
inPK
);
byte
[]
encKey
=
new
byte
[
keyfis
.
available
()];
byte
[]
encKey
=
new
byte
[
keyfis
.
available
()];
...
...
FallIntoOblivion/src/fallintooblivion/FallIntoOblivion.java
View file @
0a69f66c
This diff is collapsed.
Click to expand it.
FallIntoOblivion/src/fallintooblivion/Helpers.java
View file @
0a69f66c
...
@@ -46,7 +46,7 @@ public class Helpers {
...
@@ -46,7 +46,7 @@ public class Helpers {
* @return devolve os bytes do ficheiro
* @return devolve os bytes do ficheiro
* @throws Exception
* @throws Exception
*/
*/
public
static
byte
[]
um
Ficheiro
(
String
filePath
)
throws
Exception
{
public
static
byte
[]
ler
Ficheiro
(
String
filePath
)
throws
Exception
{
File
file
=
new
File
(
filePath
);
File
file
=
new
File
(
filePath
);
byte
[]
getBytes
=
new
byte
[(
int
)
file
.
length
()];
byte
[]
getBytes
=
new
byte
[(
int
)
file
.
length
()];
FileInputStream
fsIn
=
new
FileInputStream
(
file
);
FileInputStream
fsIn
=
new
FileInputStream
(
file
);
...
...
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