| RSA BSAFE Cert-C |
Certificate Components for C |
| Crypto-C 6.2.1 Developer's Guide | ||
| Search |
This structure is used with C_BERDecodeBitString(), C_DEREncodeBitString() and C_DEREncodeNamedBitString(). It is also used in the CERT_FIELDS structure.
For example, given the following 12-bit string: 1011 0000 1001
Create the following BIT_STRING structure:
BIT_STRING newBitString;
unsigned char bitData[2];
bitData[0] = 0xB0;
bitData[1] = 0x90;
newBitString.data = bitData;
newBitString.len = 2;
newBitString.unusedBits = 4;
demoutil.c, and pkcs10.c.
#include <basetype.h>
typedef struct BIT_STRING { unsigned char *data; unsigned int len; unsigned int unusedBits; } BIT_STRING;
Data Fields | |
| unsigned char* | data |
A pointer to an unsigned char array that holds the data comprising the bit string. | |
| unsigned int | len |
An unsigned int value that indicates the length, in Bytes, of the data. | |
| unsigned int | unusedBits |
An unsigned int value that specifies the number of bits in data, in the least significant positions, that are not part of the bit string. More... | |
|
|
An |