Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libjitsi
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ZRTP
libjitsi
Commits
c9ce7de5
Commit
c9ce7de5
authored
10 years ago
by
Lyubomir Marinov
Browse files
Options
Downloads
Patches
Plain Diff
Comments java.util.Base64 out of the CryptoBenchmark because it is not available in Java 6.
parent
e0473676
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/org/jitsi/impl/neomedia/transform/srtp/CryptoBenchmark.java
+6
-5
6 additions, 5 deletions
...g/jitsi/impl/neomedia/transform/srtp/CryptoBenchmark.java
with
6 additions
and
5 deletions
src/org/jitsi/impl/neomedia/transform/srtp/CryptoBenchmark.java
+
6
−
5
View file @
c9ce7de5
...
...
@@ -137,7 +137,7 @@ else if ("-nio-block-cipher".equalsIgnoreCase(arg))
long
time0
=
0
;
int
dMax
=
Math
.
max
(
digests
.
length
,
messageDigests
.
length
);
final
int
iEnd
=
1000
,
jEnd
=
1000
;
Base64
.
Encoder
byteEncoder
=
Base64
.
getEncoder
().
withoutPadding
();
//
Base64.Encoder byteEncoder = Base64.getEncoder().withoutPadding();
inNIO
.
order
(
ByteOrder
.
nativeOrder
());
outNIO
.
order
(
ByteOrder
.
nativeOrder
());
...
...
@@ -244,7 +244,7 @@ else if (cipher != null && benchmarkJavaxCryptoCipher)
clazz
.
getName
()
+
": ratio "
+
String
.
format
(
"%.2f"
,
time
/
(
double
)
time0
)
+
", time "
+
time
+
", out "
+
byteEncoder
.
encodeToString
(
out
)
+
"."
);
/*
+ byteEncoder.encodeToString(out)
*/
+
"."
);
}
// org.bouncycastle.crypto.Digest & java.security.MessageDigest
...
...
@@ -286,7 +286,7 @@ else if (cipher != null && benchmarkJavaxCryptoCipher)
digest
.
getClass
().
getName
()
+
": ratio "
+
String
.
format
(
"%.2f"
,
time
/
(
double
)
time0
)
+
", time "
+
time
+
", digest "
+
byteEncoder
.
encodeToString
(
out
)
+
"."
);
/*
+ byteEncoder.encodeToString(out)
*/
+
"."
);
}
// java.security.MessageDigest
...
...
@@ -295,6 +295,7 @@ else if (cipher != null && benchmarkJavaxCryptoCipher)
if
(
messageDigest
!=
null
)
{
@SuppressWarnings
(
"unused"
)
byte
[]
t
=
null
;
startTime
=
System
.
nanoTime
();
...
...
@@ -318,7 +319,7 @@ else if (cipher != null && benchmarkJavaxCryptoCipher)
+
": ratio "
+
String
.
format
(
"%.2f"
,
time
/
(
double
)
time0
)
+
", time "
+
(
endTime
-
startTime
)
+
", digest "
+
byteEncoder
.
encodeToString
(
t
)
+
", digest "
/*
+ byteEncoder.encodeToString(t)
*/
+
"."
);
}
}
...
...
@@ -353,7 +354,7 @@ else if (cipher != null && benchmarkJavaxCryptoCipher)
mac
.
getClass
().
getName
()
+
": ratio "
+
String
.
format
(
"%.2f"
,
time
/
(
double
)
time0
)
+
", time "
+
time
+
", out "
+
byteEncoder
.
encodeToString
(
out
)
+
"."
);
/*
+ byteEncoder.encodeToString(out)
*/
+
"."
);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment