int ber_skip_integer(uint32 value) { if (value <= 0xFF) { return _ber_skip_length(1) + 2; } else if (value <= 0xFFFF) { return _ber_skip_length(2) + 3; } else if (value <= 0xFFFFFFFF) { return _ber_skip_length(4) + 5; } return 0; }
int ber_skip_octet_string(int length) { return 1 + _ber_skip_length(length) + length; }
int ber_write_octet_string_tag(STREAM* s, int length) { ber_write_universal_tag(s, BER_TAG_OCTET_STRING, false); ber_write_length(s, length); return 1 + _ber_skip_length(length); }
int ber_skip_sequence_tag(int length) { return 1 + _ber_skip_length(length); }
int ber_skip_sequence(int length) { return 1 + _ber_skip_length(length) + length; }
int ber_skip_contextual_tag(int length) { return _ber_skip_length(length) + 1; }
int ber_write_octet_string_tag(wStream* s, int length) { ber_write_universal_tag(s, BER_TAG_OCTET_STRING, FALSE); ber_write_length(s, length); return 1 + _ber_skip_length(length); }