Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
briar
briar
Commits
6d7e1035
Commit
6d7e1035
authored
Sep 17, 2021
by
Nico
Browse files
Use default random provider on Windows
parent
32686811
Pipeline
#7508
failed with stages
in 58 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bramble-core/src/main/java/org/briarproject/bramble/system/WindowsSecureRandomProvider.java
0 → 100644
View file @
6d7e1035
package
org.briarproject.bramble.system
;
import
javax.annotation.Nullable
;
import
java.security.Provider
;
public
class
WindowsSecureRandomProvider
extends
AbstractSecureRandomProvider
{
@Nullable
@Override
public
Provider
getProvider
()
{
return
null
;
}
}
bramble-java/src/main/java/org/briarproject/bramble/system/DesktopSecureRandomModule.java
View file @
6d7e1035
...
...
@@ -9,6 +9,7 @@ import dagger.Provides;
import
static
org
.
briarproject
.
bramble
.
util
.
OsUtils
.
isLinux
;
import
static
org
.
briarproject
.
bramble
.
util
.
OsUtils
.
isMac
;
import
static
org
.
briarproject
.
bramble
.
util
.
OsUtils
.
isWindows
;
@Module
public
class
DesktopSecureRandomModule
{
...
...
@@ -18,7 +19,8 @@ public class DesktopSecureRandomModule {
SecureRandomProvider
provideSecureRandomProvider
()
{
if
(
isLinux
()
||
isMac
())
return
new
UnixSecureRandomProvider
();
// TODO: Create a secure random provider for Windows
if
(
isWindows
())
return
new
WindowsSecureRandomProvider
();
throw
new
UnsupportedOperationException
();
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment