开发者

is it corrent that using a meaningless leading zero to encode positive ASN.1 INTEGER?

开发者 https://www.devze.com 2023-03-29 02:26 出处:网络
Are these encodings same in ASN.1 INTEGER type? encoding decimal 10 02 01 0A 02 02 开发者_运维百科00 0A

Are these encodings same in ASN.1 INTEGER type?

encoding decimal 10

02 01 0A
02 02 开发者_运维百科00 0A
02 03 00 00 0A
...


I assume you are using BER. The BER encoding for an INTEGER uses the smallest possible number of octets. The second and third encodings would be incorrect.

See X.690 8.3

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号