IdentityKeyUtil.java 文件源码

java
阅读 44 收藏 0 点赞 0 评论 0

项目:Cable-Android 作者:
public static @NonNull IdentityKeyPair getIdentityKeyPair(@NonNull Context context) {
  if (!hasIdentityKey(context)) throw new AssertionError("There isn't one!");

  try {
    IdentityKey  publicKey  = getIdentityKey(context);
    ECPrivateKey privateKey = Curve.decodePrivatePoint(Base64.decode(retrieve(context, IDENTITY_PRIVATE_KEY_PREF)));

    return new IdentityKeyPair(publicKey, privateKey);
  } catch (IOException e) {
    throw new AssertionError(e);
  }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号