Click to Rate and Give Feedback
MSDN
MSDN Library
Windows Development
Cryptography
 CRYPT_BIT_BLOB structure
CRYPT_BIT_BLOB structure

Applies to: desktop apps only

The CRYPT_BIT_BLOB structure contains a set of bits represented by an array of bytes.

Syntax

typedef struct _CRYPT_BIT_BLOB {
  DWORD cbData;
  BYTE  *pbData;
  DWORD cUnusedBits;
} CRYPT_BIT_BLOB, *PCRYPT_BIT_BLOB;

Members

cbData

The number of bytes in the pbData array.

pbData

A pointer to an array of bytes that represents the bits.

cUnusedBits

The number of unused bits in the last byte of the array. The unused bits are always the least significant bits in the last byte of the array.

Remarks

Because the smallest chunk of memory that can normally be allocated is a byte, the CRYPT_BIT_BLOB structure allows the last byte in the array to contain zero to seven unused bits. The number of unused bits in the array is contained in the cUnusedBits member of this structure. The number of meaningful bits in the pbData member is calculated with the formula ((cbData × 8) – cUnusedBits). For example, if you need to represent 10 bits, you would allocate an array of 2 bytes and set cUnusedBits to 6. If you view the array as contiguous bits from left to right, the left 10 bits would be meaningful, and the right 6 bits would be unused.

Requirements

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Wincrypt.h

See also

CERT_BASIC_CONSTRAINTS_INFO
CERT_INFO
CERT_KEY_ATTRIBUTES_INFO
CERT_KEY_USAGE_RESTRICTION_INFO
CERT_PUBLIC_KEY_INFO
CERT_SIGNED_CONTENT_INFO

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
C# syntax      dmex   |   Edit   |   Show History
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Unicode)]
public struct CRYPT_BIT_BLOB
{
public uint cbData;
public IntPtr pbData;
public uint cUnusedBits;
}
Tags What's this?: c# (x) syntax (x) Add a tag
Flag as ContentBug
vb.net syntax      dmex   |   Edit   |   Show History
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)> _
Public Structure CRYPT_BIT_BLOB
Public cbData As UInt32
Public pbData As IntPtr
Public cUnusedBits As UInt32
End Structure
Flag as ContentBug
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker