Skip to content

Commit

Permalink
file
Browse files Browse the repository at this point in the history
  • Loading branch information
GreenBloodDev committed Feb 21, 2024
1 parent a689b66 commit cb05674
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/java/pl/nightdev701/security/file/AesFileSecurity.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,14 @@ public void decrypt(String inputFile, String outputFile) throws Exception {
}
}

@Override
public void encrypt(File inputFile, String outputFile) throws Exception {
encrypt(inputFile.getAbsolutePath(), outputFile);
}

@Override
public void decrypt(File inputFile, String outputFile) throws Exception {
decrypt(inputFile.getAbsolutePath(), outputFile);
}

}
12 changes: 12 additions & 0 deletions src/main/java/pl/nightdev701/util/crypto/FileCryptoForm.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package pl.nightdev701.util.crypto;

import java.io.File;

public interface FileCryptoForm {

/**
Expand All @@ -12,4 +14,14 @@ public interface FileCryptoForm {
*/
void decrypt(String inputFile, String outputFile) throws Exception;

/**
* encrypt file
*/
void encrypt(File inputFile, String outputFile) throws Exception;

/**
* decrypt file
*/
void decrypt(File inputFile, String outputFile) throws Exception;

}

0 comments on commit cb05674

Please sign in to comment.