Fakultas Ilmu Komputer UI

Commit 13f1a8ed authored by Achmad Afriza's avatar Achmad Afriza

forgot to change the end timelapsed

parent c39bce6a
......@@ -62,13 +62,13 @@ public class Application {
long startEncryptNano = Instant.now().getNano();
byte[] cipher = aes.encrypt(plain, parameters);
long endEncryptNano = Instant.now().getNano();
long endEncryptTime = Instant.now().toEpochMilli();
long endEncryptTime = Instant.now().getEpochSecond();
long startDecryptTime = Instant.now().getEpochSecond();
long startDecryptNano = Instant.now().getNano();
byte[] decrypt = aes.decrypt(cipher, parameters);
long endDecryptNano = Instant.now().getNano();
long endDecryptTime = Instant.now().toEpochMilli();
long endDecryptTime = Instant.now().getEpochSecond();
BigInteger encryptTime = BigInteger
.valueOf(endEncryptTime)
......@@ -121,13 +121,13 @@ public class Application {
long startEncryptNano = Instant.now().getNano();
byte[] cipher = rsa.encrypt(plain, (AsymmetricKeyParameter) keyPair.getPublic());
long endEncryptNano = Instant.now().getNano();
long endEncryptTime = Instant.now().toEpochMilli();
long endEncryptTime = Instant.now().getEpochSecond();
long startDecryptTime = Instant.now().getEpochSecond();
long startDecryptNano = Instant.now().getNano();
byte[] decrypt = rsa.decrypt(cipher, (AsymmetricKeyParameter) keyPair.getPrivate());
long endDecryptNano = Instant.now().getNano();
long endDecryptTime = Instant.now().toEpochMilli();
long endDecryptTime = Instant.now().getEpochSecond();
BigInteger encryptTime = BigInteger
.valueOf(endEncryptTime)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment