小编Pro*_*mer的帖子

JDK 15 中的 Ed25519,从字节数组中解析公钥并验证

由于 Ed25519 出现的时间不长(在 JDK 中),因此关于如何使用它的资源很少。

虽然他们的示例非常简洁和有用,但我在理解密钥解析方面做错了什么时遇到了一些困难。

他们的公钥是从 iDevice 发送的数据包中读取的。

(这么说吧,它是一个字节数组)

通过搜索并尽力了解密钥的编码方式,我偶然发现了这条消息。

   4.  The public key A is the encoding of the point [s]B.  First,
       encode the y-coordinate (in the range 0 <= y < p) as a little-
       endian string of 32 octets.  The most significant bit of the
       final octet is always zero.  To form the encoding of the point
       [s]B, copy the least significant bit of the x coordinate to the
       most significant bit of the final octet. …
Run Code Online (Sandbox Code Playgroud)

java kotlin ed25519 java-15

7
推荐指数
1
解决办法
2146
查看次数

变量INT,getter DOUBLE

如果变量是int,是否可以在kotlin中设置getter以返回int的双重insted?

没有宣布新的功能.

var x = 0
    get() = x.toDouble()
Run Code Online (Sandbox Code Playgroud)

getter kotlin

0
推荐指数
1
解决办法
29
查看次数

标签 统计

kotlin ×2

ed25519 ×1

getter ×1

java ×1

java-15 ×1