[#ASN1_BIT_STRING_get_bit]
= ASN1&lowbar;BIT&lowbar;STRING&lowbar;get&lowbar;bit
:mrdocs:

Test whether bit `n` is set in an ASN&period;1 BIT STRING&period;

== Synopsis

Declared in `&lt;openssl&sol;asn1&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
ASN1&lowbar;BIT&lowbar;STRING&lowbar;get&lowbar;bit(
    xref:ASN1_BIT_STRING.adoc[ASN1&lowbar;BIT&lowbar;STRING] const* a,
    int n);
----

== Return Value

1 if the bit is set, or 0 if clear &sol; out of range &sol; `a` is NULL&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *a*
| Bit string to query&semi; NULL or short strings are treated as clear&period;
| *n*
| Zero&hyphen;based bit index&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
