⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cryptlib.cs

📁 老外写的加密库cryptlib(版本3.1)
💻 CS
📖 第 1 页 / 共 5 页
字号:
	   don't follow the X.509 naming since in that scheme the enumerated types	   and bitflags have the same names */		public const int CRLREASONFLAG_UNUSED                     = 0x001;	public const int CRLREASONFLAG_KEYCOMPROMISE              = 0x002;	public const int CRLREASONFLAG_CACOMPROMISE               = 0x004;	public const int CRLREASONFLAG_AFFILIATIONCHANGED         = 0x008;	public const int CRLREASONFLAG_SUPERSEDED                 = 0x010;	public const int CRLREASONFLAG_CESSATIONOFOPERATION       = 0x020;	public const int CRLREASONFLAG_CERTIFICATEHOLD            = 0x040;	public const int CRLREASONFLAG_LAST                       = 0x080; // Last poss.value		/* X.509 CRL holdInstruction codes */		public const int HOLDINSTRUCTION_NONE        = 0;	public const int HOLDINSTRUCTION_CALLISSUER  = 1;	public const int HOLDINSTRUCTION_REJECT      = 2;	public const int HOLDINSTRUCTION_PICKUPTOKEN = 3;	public const int HOLDINSTRUCTION_LAST        = 4;		/* Certificate checking compliance levels */		public const int COMPLIANCELEVEL_OBLIVIOUS    = 0;	public const int COMPLIANCELEVEL_REDUCED      = 1;	public const int COMPLIANCELEVEL_STANDARD     = 2;	public const int COMPLIANCELEVEL_PKIX_PARTIAL = 3;	public const int COMPLIANCELEVEL_PKIX_FULL    = 4;	public const int COMPLIANCELEVEL_LAST         = 5;		/* Flags for the Netscape netscape-cert-type extension */		public const int NS_CERTTYPE_SSLCLIENT                    = 0x001;	public const int NS_CERTTYPE_SSLSERVER                    = 0x002;	public const int NS_CERTTYPE_SMIME                        = 0x004;	public const int NS_CERTTYPE_OBJECTSIGNING                = 0x008;	public const int NS_CERTTYPE_RESERVED                     = 0x010;	public const int NS_CERTTYPE_SSLCA                        = 0x020;	public const int NS_CERTTYPE_SMIMECA                      = 0x040;	public const int NS_CERTTYPE_OBJECTSIGNINGCA              = 0x080;	public const int NS_CERTTYPE_LAST                         = 0x100; // Last possible value		/* Flags for the SET certificate-type extension */		public const int SET_CERTTYPE_CARD                        = 0x001;	public const int SET_CERTTYPE_MER                         = 0x002;	public const int SET_CERTTYPE_PGWY                        = 0x004;	public const int SET_CERTTYPE_CCA                         = 0x008;	public const int SET_CERTTYPE_MCA                         = 0x010;	public const int SET_CERTTYPE_PCA                         = 0x020;	public const int SET_CERTTYPE_GCA                         = 0x040;	public const int SET_CERTTYPE_BCA                         = 0x080;	public const int SET_CERTTYPE_RCA                         = 0x100;	public const int SET_CERTTYPE_ACQ                         = 0x200;	public const int SET_CERTTYPE_LAST                        = 0x400; // Last possible value		/* CMS contentType values */		// CRYPT_CONTENT_TYPE	public const int CONTENT_NONE                   = 0 ;	public const int CONTENT_DATA                   = 1 ;	public const int CONTENT_SIGNEDDATA             = 2 ;	public const int CONTENT_ENVELOPEDDATA          = 3 ;	public const int CONTENT_SIGNEDANDENVELOPEDDATA = 4 ;	public const int CONTENT_DIGESTEDDATA           = 5 ;	public const int CONTENT_ENCRYPTEDDATA          = 6 ;	public const int CONTENT_COMPRESSEDDATA         = 7 ;	public const int CONTENT_TSTINFO                = 8 ;	public const int CONTENT_SPCINDIRECTDATACONTEXT = 9 ;	public const int CONTENT_RTCSREQUEST            = 10;	public const int CONTENT_RTCSRESPONSE           = 11;	public const int CONTENT_RTCSRESPONSE_EXT       = 12;	public const int CONTENT_LAST                   = 13;		/* ESS securityClassification codes */		public const int CLASSIFICATION_UNMARKED     = 0  ;	public const int CLASSIFICATION_UNCLASSIFIED = 1  ;	public const int CLASSIFICATION_RESTRICTED   = 2  ;	public const int CLASSIFICATION_CONFIDENTIAL = 3  ;	public const int CLASSIFICATION_SECRET       = 4  ;	public const int CLASSIFICATION_TOP_SECRET   = 5  ;	public const int CLASSIFICATION_LAST         = 255;		/* RTCS certificate status */		public const int CERTSTATUS_VALID            = 0;	public const int CERTSTATUS_NOTVALID         = 1;	public const int CERTSTATUS_NONAUTHORITATIVE = 2;	public const int CERTSTATUS_UNKNOWN          = 3;		/* OCSP revocation status */		public const int OCSPSTATUS_NOTREVOKED = 0;	public const int OCSPSTATUS_REVOKED    = 1;	public const int OCSPSTATUS_UNKNOWN    = 2;		/* The amount of detail to include in signatures when signing certificate	   objects */		// CRYPT_SIGNATURELEVEL_TYPE	public const int SIGNATURELEVEL_NONE       = 0; // Include only signature	public const int SIGNATURELEVEL_SIGNERCERT = 1; // Include signer cert	public const int SIGNATURELEVEL_ALL        = 2; // Include all relevant info	public const int SIGNATURELEVEL_LAST       = 3; // Last possible sig.level type		/* The certificate export format type, which defines the format in which a	   certificate object is exported */		// CRYPT_CERTFORMAT_TYPE	public const int CERTFORMAT_NONE             = 0; // No certificate format	public const int CERTFORMAT_CERTIFICATE      = 1; // DER-encoded certificate	public const int CERTFORMAT_CERTCHAIN        = 2; // PKCS #7 certificate chain	public const int CERTFORMAT_TEXT_CERTIFICATE = 3; // base-64 wrapped cert	public const int CERTFORMAT_TEXT_CERTCHAIN   = 4; // base-64 wrapped cert chain	public const int CERTFORMAT_XML_CERTIFICATE  = 5; // XML wrapped cert	public const int CERTFORMAT_XML_CERTCHAIN    = 6; // XML wrapped cert chain	public const int CERTFORMAT_LAST             = 7; // Last possible cert.format type		/* CMP request types */		// CRYPT_REQUESTTYPE_TYPE	public const int REQUESTTYPE_NONE           = 0; // No request type	public const int REQUESTTYPE_INITIALISATION = 1; // Initialisation request	public const int REQUESTTYPE_INITIALIZATION = 1;	public const int REQUESTTYPE_CERTIFICATE    = 2; // Certification request	public const int REQUESTTYPE_KEYUPDATE      = 3; // Key update request	public const int REQUESTTYPE_REVOCATION     = 4; // Cert revocation request	public const int REQUESTTYPE_PKIBOOT        = 5; // PKIBoot request	public const int REQUESTTYPE_LAST           = 6; // Last possible request type		/* Key ID types */		// CRYPT_KEYID_TYPE	public const int KEYID_NONE  = 0; // No key ID type	public const int KEYID_NAME  = 1; // Key owner name	public const int KEYID_EMAIL = 2; // Key owner email address	public const int KEYID_LAST  = 3; // Last possible key ID type		/* The encryption object types */		// CRYPT_OBJECT_TYPE	public const int OBJECT_NONE             = 0; // No object type	public const int OBJECT_ENCRYPTED_KEY    = 1; // Conventionally encrypted key	public const int OBJECT_PKCENCRYPTED_KEY = 2; // PKC-encrypted key	public const int OBJECT_KEYAGREEMENT     = 3; // Key agreement information	public const int OBJECT_SIGNATURE        = 4; // Signature	public const int OBJECT_LAST             = 5; // Last possible object type		/* Object/attribute error type information */		// CRYPT_ERRTYPE_TYPE	public const int ERRTYPE_NONE             = 0; // No error information	public const int ERRTYPE_ATTR_SIZE        = 1; // Attribute data too small or large	public const int ERRTYPE_ATTR_VALUE       = 2; // Attribute value is invalid	public const int ERRTYPE_ATTR_ABSENT      = 3; // Required attribute missing	public const int ERRTYPE_ATTR_PRESENT     = 4; // Non-allowed attribute present	public const int ERRTYPE_CONSTRAINT       = 5; // Cert: Constraint violation in object	public const int ERRTYPE_ISSUERCONSTRAINT = 6; // Cert: Constraint viol.in issuing cert	public const int ERRTYPE_LAST             = 7; // Last possible error info type		/* Cert store management action type */		// CRYPT_CERTACTION_TYPE	public const int CERTACTION_NONE                   = 0 ; // No cert management action	public const int CERTACTION_CREATE                 = 1 ; // Create cert store	public const int CERTACTION_CONNECT                = 2 ; // Connect to cert store	public const int CERTACTION_DISCONNECT             = 3 ; // Disconnect from cert store	public const int CERTACTION_ERROR                  = 4 ; // Error information	public const int CERTACTION_ADDUSER                = 5 ; // Add PKI user	public const int CERTACTION_REQUEST_CERT           = 6 ; // Cert request	public const int CERTACTION_REQUEST_RENEWAL        = 7 ; // Cert renewal request	public const int CERTACTION_REQUEST_REVOCATION     = 8 ; // Cert revocation request	public const int CERTACTION_CERT_CREATION          = 9 ; // Cert creation	public const int CERTACTION_CERT_CREATION_COMPLETE = 10; // Confirmation of cert creation	public const int CERTACTION_CERT_CREATION_DROP     = 11; // Cancellation of cert creation	public const int CERTACTION_CERT_CREATION_REVERSE  = 12; // Cancel of creation w.revocation	public const int CERTACTION_RESTART_CLEANUP        = 13; // Delete reqs after restart	public const int CERTACTION_RESTART_REVOKE_CERT    = 14; // Complete revocation after restart	public const int CERTACTION_ISSUE_CERT             = 15; // Cert issue	public const int CERTACTION_ISSUE_CRL              = 16; // CRL issue	public const int CERTACTION_REVOKE_CERT            = 17; // Cert revocation	public const int CERTACTION_EXPIRE_CERT            = 18; // Cert expiry	public const int CERTACTION_CLEANUP                = 19; // Clean up on restart	public const int CERTACTION_LAST                   = 20; // Last possible cert store log action		/****************************************************************************	*																			*	*								General Constants							*	*																			*	****************************************************************************/		/* The maximum user key size - 2048 bits */		public const int MAX_KEYSIZE                              = 256 ;		/* The maximum IV size - 256 bits */		public const int MAX_IVSIZE                               = 32  ;		/* The maximum public-key component size - 4096 bits */		public const int MAX_PKCSIZE                              = 512 ;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -