Fakultas Ilmu Komputer UI

Commit c39bce6a authored by Achmad Afriza's avatar Achmad Afriza

fixed overlapping timelapsed

parent 905f2792
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="bin/main" path="src/main/java">
<attributes>
<attribute name="gradle_scope" value="main"/>
<attribute name="gradle_used_by_scope" value="main,test"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-15/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin/default"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>paper-experiment</name>
<comment>Project paper-daa created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
</projectDescription>
arguments=
auto.sync=false
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
connection.project.dir=
eclipse.preferences.version=1
gradle.user.home=
java.home=/usr/lib/jvm/adoptopenjdk-15-hotspot-amd64
jvm.arguments=
offline.mode=false
override.workspace.settings=true
show.console.view=true
show.executions.view=true
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=15
org.eclipse.jdt.core.compiler.compliance=15
org.eclipse.jdt.core.compiler.source=15
Manifest-Version: 1.0
Main-Class: com.daa.Application
Manifest-Version: 1.0
Main-Class: com.daa.Application
......@@ -58,13 +58,13 @@ public class Application {
String plainText = record.get("Data");
byte[] plain = hexStringToByteArray(plainText);
long startEncryptTime = Instant.now().toEpochMilli();
long startEncryptTime = Instant.now().getEpochSecond();
long startEncryptNano = Instant.now().getNano();
byte[] cipher = aes.encrypt(plain, parameters);
long endEncryptNano = Instant.now().getNano();
long endEncryptTime = Instant.now().toEpochMilli();
long startDecryptTime = Instant.now().toEpochMilli();
long startDecryptTime = Instant.now().getEpochSecond();
long startDecryptNano = Instant.now().getNano();
byte[] decrypt = aes.decrypt(cipher, parameters);
long endDecryptNano = Instant.now().getNano();
......@@ -72,21 +72,21 @@ public class Application {
BigInteger encryptTime = BigInteger
.valueOf(endEncryptTime)
.multiply(BigInteger.valueOf(1_000_000))
.multiply(BigInteger.valueOf(1_000_000_000))
.add(BigInteger.valueOf(endEncryptNano))
.subtract(
BigInteger.valueOf(startEncryptTime)
.multiply(BigInteger.valueOf(1_000_000))
.multiply(BigInteger.valueOf(1_000_000_000))
.add(BigInteger.valueOf(startEncryptNano))
);
BigInteger decryptTime = BigInteger
.valueOf(endDecryptTime)
.multiply(BigInteger.valueOf(1_000_000))
.multiply(BigInteger.valueOf(1_000_000_000))
.add(BigInteger.valueOf(endDecryptNano))
.subtract(
BigInteger.valueOf(startDecryptTime)
.multiply(BigInteger.valueOf(1_000_000))
.multiply(BigInteger.valueOf(1_000_000_000))
.add(BigInteger.valueOf(startDecryptNano))
);
......@@ -117,13 +117,13 @@ public class Application {
String plainText = record.get("Data");
byte[] plain = hexStringToByteArray(plainText);
long startEncryptTime = Instant.now().toEpochMilli();
long startEncryptTime = Instant.now().getEpochSecond();
long startEncryptNano = Instant.now().getNano();
byte[] cipher = rsa.encrypt(plain, (AsymmetricKeyParameter) keyPair.getPublic());
long endEncryptNano = Instant.now().getNano();
long endEncryptTime = Instant.now().toEpochMilli();
long startDecryptTime = Instant.now().toEpochMilli();
long startDecryptTime = Instant.now().getEpochSecond();
long startDecryptNano = Instant.now().getNano();
byte[] decrypt = rsa.decrypt(cipher, (AsymmetricKeyParameter) keyPair.getPrivate());
long endDecryptNano = Instant.now().getNano();
......@@ -131,21 +131,21 @@ public class Application {
BigInteger encryptTime = BigInteger
.valueOf(endEncryptTime)
.multiply(BigInteger.valueOf(1_000_000))
.multiply(BigInteger.valueOf(1_000_000_000))
.add(BigInteger.valueOf(endEncryptNano))
.subtract(
BigInteger.valueOf(startEncryptTime)
.multiply(BigInteger.valueOf(1_000_000))
.multiply(BigInteger.valueOf(1_000_000_000))
.add(BigInteger.valueOf(startEncryptNano))
);
BigInteger decryptTime = BigInteger
.valueOf(endDecryptTime)
.multiply(BigInteger.valueOf(1_000_000))
.multiply(BigInteger.valueOf(1_000_000_000))
.add(BigInteger.valueOf(endDecryptNano))
.subtract(
BigInteger.valueOf(startDecryptTime)
.multiply(BigInteger.valueOf(1_000_000))
.multiply(BigInteger.valueOf(1_000_000_000))
.add(BigInteger.valueOf(startDecryptNano))
);
......
ssh -i gcp wishnuhazmi@34.133.175.68
rsync -Pav -e "ssh -i gcp" ./app/* wishnuhazmi@34.133.175.68:/home/app/
\ No newline at end of file
rsync -Pav -e "ssh -i gcp" ./app/* wishnuhazmi@35.233.195.182:~/app/
\ No newline at end of file
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