小编Erè*_*èbe的帖子

在github上存储ssh密钥是否安全?

我想知道在公共git存储库中存储公钥和私钥是否安全?这些密钥受密码保护.

我愿意这样做是为了保存我当前的linux配置.如果这样做不安全,你知道实现目标的方法吗?

问候

cryptography rsa ssh-keys public-key-encryption

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

RankNTypes和模式匹配

haskell中是否有一种方法可以将类型信息/向下转换为多态值?

在示例中,我有一个盒装类型T,它可以包含一个Int或一个Char我想写一个函数来提取这个值而不知道它是哪个类型.

{#- LANGUAGE RankNTypes -#}

data T = I Int | C Char

-- This is not working because GHC cannot bind "a"
-- with specific type Int and Char at the same time. 
-- I just want a polymorphic value back ;(
getValue :: T -> (forall a. a)
getValue (I val) = val
getValue (C val) = val

-- This on the other hand works, because the function
-- is local to the pattern matching expression
onValue …
Run Code Online (Sandbox Code Playgroud)

polymorphism haskell higher-rank-types

0
推荐指数
2
解决办法
100
查看次数