pub fn new_with_rng(csprng: R, config: &CryptoConfig) -> Self {
        let node_public_keys = match read_node_public_keys(&config.crypto_root) {
            Ok(node_pks) => node_pks,
            Err(_) => Default::default(),
        };
        let public_key_data = PublicKeyData::new(node_public_keys);
        Csp {
            csprng: CspRwLock::new_for_rng(csprng, Arc::new(CryptoMetrics::none())),
            public_key_data,
            secret_key_store: CspRwLock::new_for_sks(
                ProtoSecretKeyStore::open(&config.crypto_root, None),
                Arc::new(CryptoMetrics::none()),
            ),
            logger: no_op_logger(),
        }
    }
/// Creates a crypto service provider for testing.
///
/// Note: This MUST NOT be used in production as the secrecy of the random
/// number generator, hence the keys, is not guaranteed.
Creates a crypto service provider for testing.
Note: This MUST NOT be used in production as the secrecy of the random
number generator, hence the keys, is not guaranteed.
Creates a crypto service provider for testing . Note : This MUST NOT be used in production as the secrecy of the random number generator hence the keys is not guaranteed .
pub fn new_with_rng(csprng: R, config: &CryptoConfig) -> Self {
        let node_public_keys = match read_node_public_keys(&config.crypto_root) {
            Ok(node_pks) => node_pks,
            Err(_) => Default::default(),
        };
        let public_key_data = PublicKeyData::new(node_public_keys);
        Csp {
            csprng: CspRwLock::new_for_rng(csprng, Arc::new(CryptoMetrics::none())),
            public_key_data,
            secret_key_store: CspRwLock::new_for_sks(
                ProtoSecretKeyStore::open(&config.crypto_root, None),
                Arc::new(CryptoMetrics::none()),
            ),
            logger: no_op_logger(),
        }
    }
pub fn new_with_rng ( csprng : R , config : & CryptoConfig ) -> Self { let node_public_keys = match read_node_public_keys ( & config . crypto_root ) { Ok ( node_pks ) => node_pks , Err ( _ ) => Default :: default ( ) , } ; let public_key_data = PublicKeyData :: new ( node_public_keys ) ; Csp { csprng : CspRwLock :: new_for_rng ( csprng , Arc :: new ( CryptoMetrics :: none ( ) ) ) , public_key_data , secret_key_store : CspRwLock :: new_for_sks ( ProtoSecretKeyStore :: open ( & config . crypto_root , None ) , Arc :: new ( CryptoMetrics :: none ( ) ) , ) , logger : no_op_logger ( ) , } }
Creates a crypto service provider for testing.
Creates a crypto service provider for testing .
csprng
R
config
&CryptoConfig
csprng
R
config
&CryptoConfig