小编mst*_*188的帖子

什么是优秀的嵌入式TLS库?(Cyassl vs Polarssl vs Matrixssl)

我一直在寻找支持TLS 1.2的良好SSL/TLS库

我还想在嵌入式平台上使用这个库,因此它应该小巧,简单,安全且免费.它应该是ac/c ++库.

到目前为止,我遇到了很多Cyassl,Polarssl Matrixssl,所以我认为其中一个应该是一个不错的选择(Openssl太大了).

现在我想知道为什么人们使用一个而不是另一个.

谢谢

c ssl polarssl wolfssl

20
推荐指数
1
解决办法
2万
查看次数

从Android中的Intent检索调用Activity

我试图在我的意图中传递我的活动指针,但我不知道如何检索它.

我有一个调用活动(MyActivity),其中包含以下代码片段:

Intent myServiceIntent = new Intent(this, myService.class);
startService(myServiceIntent);
Run Code Online (Sandbox Code Playgroud)

在我的服务类中,我想要检索调用活动.像这样的东西:

private Activity CurrentActivity = null;    
public int onStartCommand(Intent intent, int flags, int startId) 
    {
        CurrentActivity = (CurrentActivity) intent.getClass();
        return super.onStartCommand(intent, flags, startId);
    }
Run Code Online (Sandbox Code Playgroud)

这不起作用,但我也不知道是什么.我也找不到将活动作为参数的putExtra.那我该怎么做呢?

android android-intent android-service android-activity

4
推荐指数
1
解决办法
8395
查看次数