mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-11 18:29:05 +01:00
24 lines
585 B
Java
24 lines
585 B
Java
package net.sf.briar.crypto;
|
|
|
|
import java.security.NoSuchAlgorithmException;
|
|
|
|
import net.sf.briar.api.crypto.KeyParser;
|
|
|
|
import com.google.inject.AbstractModule;
|
|
|
|
public class CryptoModule extends AbstractModule {
|
|
|
|
public static final String DIGEST_ALGO = "SHA-256";
|
|
public static final String KEY_PAIR_ALGO = "RSA";
|
|
public static final String SIGNATURE_ALGO = "SHA256withRSA";
|
|
|
|
@Override
|
|
protected void configure() {
|
|
try {
|
|
bind(KeyParser.class).toInstance(new KeyParserImpl(KEY_PAIR_ALGO));
|
|
} catch(NoSuchAlgorithmException e) {
|
|
throw new RuntimeException(e);
|
|
}
|
|
}
|
|
}
|