- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for asn1BitLength (0.21 sec)
-
src/crypto/x509/x509.go
b2 := b1>>2&0x33 | b1<<2&0xcc b3 := b2>>1&0x55 | b2<<1&0xaa return b3 } // asn1BitLength returns the bit-length of bitString by considering the // most-significant bit in a byte to be the "first" bit. This convention // matches ASN.1, but differs from almost everything else. func asn1BitLength(bitString []byte) int { bitLen := len(bitString) * 8 for i := range bitString {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 09:20:15 UTC 2024 - 82K bytes - Viewed (0) -
src/crypto/x509/x509_test.go
{[]byte{0xf0}, 4}, {[]byte{0x88}, 5}, {[]byte{0xff}, 8}, {[]byte{0xff, 0x80}, 9}, {[]byte{0xff, 0x81}, 16}, } for i, test := range tests { if got := asn1BitLength(test.bytes); got != test.bitLen { t.Errorf("#%d: calculated bit-length of %d for %x, wanted %d", i, got, test.bytes, test.bitLen) } } } func TestVerifyEmptyCertificate(t *testing.T) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 21:00:16 UTC 2024 - 163.4K bytes - Viewed (0)