本文整理汇总了Java中com.subgraph.orchid.crypto.PRNGFixes类的典型用法代码示例。如果您正苦于以下问题:Java PRNGFixes类的具体用法?Java PRNGFixes怎么用?Java PRNGFixes使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PRNGFixes类属于com.subgraph.orchid.crypto包,在下文中一共展示了PRNGFixes类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: TorClient
import com.subgraph.orchid.crypto.PRNGFixes; //导入依赖的package包/类
public TorClient(DirectoryStore customDirectoryStore) {
if(Tor.isAndroidRuntime()) {
PRNGFixes.apply();
}
config = Tor.createConfig();
directory = Tor.createDirectory(config, customDirectoryStore);
initializationTracker = Tor.createInitalizationTracker();
initializationTracker.addListener(createReadyFlagInitializationListener());
connectionCache = Tor.createConnectionCache(config, initializationTracker);
directoryDownloader = Tor.createDirectoryDownloader(config, initializationTracker);
circuitManager = Tor.createCircuitManager(config, directoryDownloader, directory, connectionCache, initializationTracker);
socksListener = Tor.createSocksPortListener(config, circuitManager);
readyLatch = new CountDownLatch(1);
dashboard = new Dashboard();
dashboard.addRenderables(circuitManager, directoryDownloader, socksListener);
}
开发者ID:HashEngineering,项目名称:namecoinj,代码行数:17,代码来源:TorClient.java
示例2: onCreate
import com.subgraph.orchid.crypto.PRNGFixes; //导入依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
Log.i(TAG, ".onCreate()");
PRNGFixes.apply();
final Intent intent = new Intent(this, EWWalletService.class);
bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
//startService(intent);
initLogging();
/*if (BuildConfig.DEBUG) {
timer = new Timer();
timedLogStat = new TimedLogStat(this);
timer.schedule(timedLogStat, 30000L, 30000L);
}*/
final int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024);
// Use 1/8th of the available memory for this memory cache.
final int cacheSize = maxMemory / 8;
Log.i(TAG, "cache size=" + cacheSize);
bitmapCache = new LruCache<String, Bitmap>(cacheSize) {
@Override
protected int sizeOf(String key, Bitmap bitmap) {
// The cache size will be measured in kilobytes rather than
// number of items.
return bitmap.getByteCount() / 1024;
}
};
}
开发者ID:RCasatta,项目名称:EternityWallAndroid,代码行数:33,代码来源:EWApplication.java
注:本文中的com.subgraph.orchid.crypto.PRNGFixes类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论