-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDecrypt.java
More file actions
22 lines (21 loc) · 741 Bytes
/
Decrypt.java
File metadata and controls
22 lines (21 loc) · 741 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
public class Decrypt {
public static void main(String[] args) {
// byte[] decodedBytes = Base64.getDecoder().decode(encodedString);
// String decodedString = new String(decodedBytes);
// Read key_file_name (private key)
// Read source_file_name (crypted)
// Read dest_file_name (decrypted)
//
// Load key, modulus from key_file_name
//
// originalEncodedText = ""
// for line in source_file_name do
// encodedChunk = get_line_as_big_integer(line)
// originalChunk = encodedChunk.modPow(key, modulus) // (encoded^key) % modulus
// base64encodedChunk = convert_big_int_to_str(originalChunk)
// originalEncodedText += base64encodedChunk
// done
//
// decryptedText = base64decode(originalEncodedText)
}
}