Lines Matching refs:length
59 (constructed, definite-length)
60 <length> possible multiple bytes, need to parse/generate
69 the sequence tag and length octets, the mech OID DER encoding, and the
76 der_length_size( int length)
78 if (length < (1<<7))
80 else if (length < (1<<8))
86 else if (length < (1<<16))
88 else if (length < (1<<24))
96 der_write_length(unsigned char **buf, int length)
98 if (length < (1<<7)) {
99 *(*buf)++ = (unsigned char) length;
101 *(*buf)++ = (unsigned char) (der_length_size(length)+127);
103 if (length >= (1<<24))
104 *(*buf)++ = (unsigned char) (length>>24);
105 if (length >= (1<<16))
106 *(*buf)++ = (unsigned char) ((length>>16)&0xff);
108 if (length >= (1<<8))
109 *(*buf)++ = (unsigned char) ((length>>8)&0xff);
110 *(*buf)++ = (unsigned char) (length&0xff);
114 /* returns decoded length, or < 0 on failure. Advances buf and
144 /* returns the length of a token, given the mech oid and the body size */