Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Commit

Permalink
HADOOP-16011. OsSecureRandom very slow compared to other SecureRandom…
Browse files Browse the repository at this point in the history
… implementations. Contributed by Siyao Meng.

Signed-off-by: Wei-Chiu Chuang <[email protected]>
  • Loading branch information
smengcl authored and sjrand committed Mar 21, 2021
1 parent 9eec406 commit 1f0af9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import org.apache.hadoop.conf.Configuration;

import com.google.common.base.Preconditions;
import org.apache.hadoop.crypto.random.OsSecureRandom;
import org.apache.hadoop.crypto.random.OpensslSecureRandom;
import org.apache.hadoop.util.ReflectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -57,7 +57,7 @@ public OpensslAesCtrCryptoCodec() {
public void setConf(Configuration conf) {
this.conf = conf;
final Class<? extends Random> klass = conf.getClass(
HADOOP_SECURITY_SECURE_RANDOM_IMPL_KEY, OsSecureRandom.class,
HADOOP_SECURITY_SECURE_RANDOM_IMPL_KEY, OpensslSecureRandom.class,
Random.class);
try {
random = ReflectionUtils.newInstance(klass, conf);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2807,7 +2807,7 @@

<property>
<name>hadoop.security.secure.random.impl</name>
<value></value>
<value>org.apache.hadoop.crypto.random.OpensslSecureRandom</value>
<description>
Implementation of secure random.
</description>
Expand Down

0 comments on commit 1f0af9a

Please sign in to comment.