Back to product page

BitCount property

Determines number of bits in the key.


An Integer value


  • Basic
The BitCount(object,KeyType) syntax has these parts:
objectAn expression evaluating to an object of type Keys.
KeyTypeRequired. A SSHKeyTypes enumeration, as described in settings. Type of the key.


The settings for KeyType are:

Constant Value Description
RSAkey 0 Sets/returns bitcount for RSA key.
DSAkey 1 Sets/returns bitcount for DSA key.
ECDSAkey 2 Sets/returns bitcount for ECDSA key.

This property will return number of bits in specified private key. Number of bits for each key is specified in Generate method when key is created. Most common value is 1024, but for stronger encryption sometimes this value can be larger.

For ECDSA key supported values are 256, 384 and 521.