All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.mstream.trader.simulation.security.SecurityModule Maven / Gradle / Ivy

package io.mstream.trader.simulation.security;

import com.google.inject.AbstractModule;
import com.google.inject.Scopes;

import javax.crypto.Cipher;
import javax.crypto.SecretKey;

public class SecurityModule extends AbstractModule {

    @Override
    protected void configure() {

        bind(SecretKey.class)
                .toProvider(SecretKeyProvider.class)
                .in(Scopes.SINGLETON);

        bind(Cipher.class)
                .annotatedWith(Encryption.class)
                .toProvider(EncryptCipherProvider.class)
                .in(Scopes.NO_SCOPE);

        bind(Cipher.class)
                .annotatedWith(Decryption.class)
                .toProvider(DecryptCipherProvider.class)
                .in(Scopes.NO_SCOPE);

        bind(SimulationTokenCipher.class)
                .in(Scopes.NO_SCOPE);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy