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

📄 cryptlib.pas

📁 老外写的加密库cryptlib(版本3.1)
💻 PAS
📖 第 1 页 / 共 5 页
字号:
      DEVINFO     - Device-specific attribute
      ENVINFO     - Envelope-specific attribute
      SESSINFO    - Session-specific attribute
      USERINFO    - User-specific attribute  }

  CRYPT_ATTRIBUTE_TYPE = Integer;
const

  CRYPT_ATTRIBUTE_NONE                                 = 0;   { Non-value }

  { Used internally }
  CRYPT_PROPERTY_FIRST                                 = 1;

  {*******************}
  { Object attributes }
  {*******************}

  { Object properties }
  CRYPT_PROPERTY_HIGHSECURITY                          = 2;   { Owned+non-forwardcount+locked }
  CRYPT_PROPERTY_OWNER                                 = 3;   { Object owner }
  CRYPT_PROPERTY_FORWARDCOUNT                          = 4;   { No.of times object can be forwarded }
  CRYPT_PROPERTY_LOCKED                                = 5;   { Whether properties can be chged/read }
  CRYPT_PROPERTY_USAGECOUNT                            = 6;   { Usage count before object expires }
  CRYPT_PROPERTY_NONEXPORTABLE                         = 7;   { Whether key is nonexp.from context }

  { Used internally }
  CRYPT_PROPERTY_LAST                                  = 8;
  CRYPT_GENERIC_FIRST                                  = 9;

  { Extended error information }
  CRYPT_ATTRIBUTE_ERRORTYPE                            = 10;  { Type of last error }
  CRYPT_ATTRIBUTE_ERRORLOCUS                           = 11;  { Locus of last error }
  CRYPT_ATTRIBUTE_INT_ERRORCODE                        = 12;  { Low-level software-specific }
  CRYPT_ATTRIBUTE_INT_ERRORMESSAGE                     = 13;  {   error code and message }

  { Generic information }
  CRYPT_ATTRIBUTE_BUFFERSIZE                           = 14;  { Internal data buffer size }

  { User internally }
  CRYPT_GENERIC_LAST                                   = 15;
  CRYPT_OPTION_FIRST                                   = 100;

  {**************************}
  { Configuration attributes }
  {**************************}

  { cryptlib information (read-only) }
  CRYPT_OPTION_INFO_DESCRIPTION                        = 101; { Text description }
  CRYPT_OPTION_INFO_COPYRIGHT                          = 102; { Copyright notice }
  CRYPT_OPTION_INFO_MAJORVERSION                       = 103; { Major release version }
  CRYPT_OPTION_INFO_MINORVERSION                       = 104; { Minor release version }
  CRYPT_OPTION_INFO_STEPPING                           = 105; { Release stepping }

  { Encryption options }
  CRYPT_OPTION_ENCR_ALGO                               = 106; { Encryption algorithm }
  CRYPT_OPTION_ENCR_HASH                               = 107; { Hash algorithm }
  CRYPT_OPTION_ENCR_MAC                                = 108; { MAC algorithm }

  { PKC options }
  CRYPT_OPTION_PKC_ALGO                                = 109; { Public-key encryption algorithm }
  CRYPT_OPTION_PKC_KEYSIZE                             = 110; { Public-key encryption key size }

  { Signature options }
  CRYPT_OPTION_SIG_ALGO                                = 111; { Signature algorithm }
  CRYPT_OPTION_SIG_KEYSIZE                             = 112; { Signature keysize }

  { Keying options }
  CRYPT_OPTION_KEYING_ALGO                             = 113; { Key processing algorithm }
  CRYPT_OPTION_KEYING_ITERATIONS                       = 114; { Key processing iterations }

  { Certificate options }
  CRYPT_OPTION_CERT_SIGNUNRECOGNISEDATTRIBUTES         = 115; { Whether to sign unrecog.attrs }
  CRYPT_OPTION_CERT_VALIDITY                           = 116; { Certificate validity period }
  CRYPT_OPTION_CERT_UPDATEINTERVAL                     = 117; { CRL update interval }
  CRYPT_OPTION_CERT_COMPLIANCELEVEL                    = 118; { PKIX compliance level for cert chks.}

  { CMS/SMIME options }
  CRYPT_OPTION_CMS_DEFAULTATTRIBUTES                   = 119; { Add default CMS attributes }
  CRYPT_OPTION_SMIME_DEFAULTATTRIBUTES                 = 119; { = CRYPT_OPTION_CMS_DEFAULTATTRIBUTES }

  { LDAP keyset options }
  CRYPT_OPTION_KEYS_LDAP_OBJECTCLASS                   = 120; { Object class }
  CRYPT_OPTION_KEYS_LDAP_OBJECTTYPE                    = 121; { Object type to fetch }
  CRYPT_OPTION_KEYS_LDAP_FILTER                        = 122; { Query filter }
  CRYPT_OPTION_KEYS_LDAP_CACERTNAME                    = 123; { CA certificate attribute name }
  CRYPT_OPTION_KEYS_LDAP_CERTNAME                      = 124; { Certificate attribute name }
  CRYPT_OPTION_KEYS_LDAP_CRLNAME                       = 125; { CRL attribute name }
  CRYPT_OPTION_KEYS_LDAP_EMAILNAME                     = 126; { Email attribute name }

  { Crypto device options }
  CRYPT_OPTION_DEVICE_PKCS11_DVR01                     = 127; { Name of first PKCS #11 driver }
  CRYPT_OPTION_DEVICE_PKCS11_DVR02                     = 128; { Name of second PKCS #11 driver }
  CRYPT_OPTION_DEVICE_PKCS11_DVR03                     = 129; { Name of third PKCS #11 driver }
  CRYPT_OPTION_DEVICE_PKCS11_DVR04                     = 130; { Name of fourth PKCS #11 driver }
  CRYPT_OPTION_DEVICE_PKCS11_DVR05                     = 131; { Name of fifth PKCS #11 driver }
  CRYPT_OPTION_DEVICE_PKCS11_HARDWAREONLY              = 132; { Use only hardware mechanisms }

  { Network access options }
  CRYPT_OPTION_NET_SOCKS_SERVER                        = 133; { Socks server name }
  CRYPT_OPTION_NET_SOCKS_USERNAME                      = 134; { Socks user name }
  CRYPT_OPTION_NET_HTTP_PROXY                          = 135; { Web proxy server }
  CRYPT_OPTION_NET_CONNECTTIMEOUT                      = 136; { Timeout for network connection setup }
  CRYPT_OPTION_NET_TIMEOUT                             = 137; { Timeout for network read/write }

  { Miscellaneous options }
  CRYPT_OPTION_MISC_ASYNCINIT                          = 138; { Whether to init cryptlib async'ly }
  CRYPT_OPTION_MISC_SIDECHANNELPROTECTION              = 139; { Protect against side-channel attacks }

  { cryptlib state information }
  CRYPT_OPTION_CONFIGCHANGED                           = 140; { Whether in-mem.opts match on-disk ones }
  CRYPT_OPTION_SELFTESTOK                              = 141; { Whether self-test was completed and OK }

  { Used internally }
  CRYPT_OPTION_LAST                                    = 142;
  CRYPT_CTXINFO_FIRST                                  = 1000;

  {********************}
  { Context attributes }
  {********************}

  { Algorithm and mode information }
  CRYPT_CTXINFO_ALGO                                   = 1001; { Algorithm }
  CRYPT_CTXINFO_MODE                                   = 1002; { Mode }
  CRYPT_CTXINFO_NAME_ALGO                              = 1003; { Algorithm name }
  CRYPT_CTXINFO_NAME_MODE                              = 1004; { Mode name }
  CRYPT_CTXINFO_KEYSIZE                                = 1005; { Key size in bytes }
  CRYPT_CTXINFO_BLOCKSIZE                              = 1006; { Block size }
  CRYPT_CTXINFO_IVSIZE                                 = 1007; { IV size }
  CRYPT_CTXINFO_KEYING_ALGO                            = 1008; { Key processing algorithm }
  CRYPT_CTXINFO_KEYING_ITERATIONS                      = 1009; { Key processing iterations }
  CRYPT_CTXINFO_KEYING_SALT                            = 1010; { Key processing salt }
  CRYPT_CTXINFO_KEYING_VALUE                           = 1011; { Value used to derive key }

  { State information }
  CRYPT_CTXINFO_KEY                                    = 1012; { Key }
  CRYPT_CTXINFO_KEY_COMPONENTS                         = 1013; { Public-key components }
  CRYPT_CTXINFO_IV                                     = 1014; { IV }
  CRYPT_CTXINFO_HASHVALUE                              = 1015; { Hash value }

  { Misc.information }
  CRYPT_CTXINFO_LABEL                                  = 1016; { Label for private/secret key }

  { Used internally }
  CRYPT_CTXINFO_LAST                                   = 1017;
  CRYPT_CERTINFO_FIRST                                 = 2000;

  {************************}
  { Certificate attributes }
  {************************}

  { Because there are so many cert attributes, we break them down into
  blocks to minimise the number of values that change if a new one is
  added halfway through }

  { Pseudo-information on a cert object or meta-information which is used
  to control the way that a cert object is processed }
  CRYPT_CERTINFO_SELFSIGNED                            = 2001; { Cert is self-signed }
  CRYPT_CERTINFO_IMMUTABLE                             = 2002; { Cert is signed and immutable }
  CRYPT_CERTINFO_XYZZY                                 = 2003; { Cert is a magic just-works cert }
  CRYPT_CERTINFO_CERTTYPE                              = 2004; { Certificate object type }
  CRYPT_CERTINFO_FINGERPRINT                           = 2005; { Certificate fingerprints }
  CRYPT_CERTINFO_FINGERPRINT_MD5                       = 2005; { = CRYPT_CERTINFO_FINGERPRINT }
  CRYPT_CERTINFO_FINGERPRINT_SHA                       = 2006;
  CRYPT_CERTINFO_CURRENT_CERTIFICATE                   = 2007; { Cursor mgt: Rel.pos in chain/CRL/OCSP }
  CRYPT_CERTINFO_CURRENT_EXTENSION                     = 2008; { Cursor mgt: Rel.pos.or abs.extension }
  CRYPT_CERTINFO_CURRENT_FIELD                         = 2009; { Cursor mgt: Rel.pos.or abs.field in ext }
  CRYPT_CERTINFO_CURRENT_COMPONENT                     = 2010; { Cursor mgt: Rel.pos in multival.field }
  CRYPT_CERTINFO_TRUSTED_USAGE                         = 2011; { Usage that cert is trusted for }
  CRYPT_CERTINFO_TRUSTED_IMPLICIT                      = 2012; { Whether cert is implicitly trusted }
  CRYPT_CERTINFO_SIGNATURELEVEL                        = 2013; { Amount of detail to include in sigs.}

  { General certificate object information }
  CRYPT_CERTINFO_VERSION                               = 2014; { Cert.format version }
  CRYPT_CERTINFO_SERIALNUMBER                          = 2015; { Serial number }
  CRYPT_CERTINFO_SUBJECTPUBLICKEYINFO                  = 2016; { Public key }
  CRYPT_CERTINFO_CERTIFICATE                           = 2017; { User certificate }
  CRYPT_CERTINFO_USERCERTIFICATE                       = 2017; { = CRYPT_CERTINFO_CERTIFICATE }
  CRYPT_CERTINFO_CACERTIFICATE                         = 2018; { CA certificate }
  CRYPT_CERTINFO_ISSUERNAME                            = 2019; { Issuer DN }
  CRYPT_CERTINFO_VALIDFROM                             = 2020; { Cert valid-from time }
  CRYPT_CERTINFO_VALIDTO                               = 2021; { Cert valid-to time }
  CRYPT_CERTINFO_SUBJECTNAME                           = 2022; { Subject DN }
  CRYPT_CERTINFO_ISSUERUNIQUEID                        = 2023; { Issuer unique ID }
  CRYPT_CERTINFO_SUBJECTUNIQUEID                       = 2024; { Subject unique ID }
  CRYPT_CERTINFO_CERTREQUEST                           = 2025; { Cert.request (DN + public key) }
  CRYPT_CERTINFO_THISUPDATE                            = 2026; { CRL/OCSP current-update time }
  CRYPT_CERTINFO_NEXTUPDATE                            = 2027; { CRL/OCSP next-update time }
  CRYPT_CERTINFO_REVOCATIONDATE                        = 2028; { CRL/OCSP cert-revocation time }
  CRYPT_CERTINFO_REVOCATIONSTATUS                      = 2029; { OCSP revocation status }
  CRYPT_CERTINFO_CERTSTATUS                            = 2030; { RTCS certificate status }
  CRYPT_CERTINFO_DN                                    = 2031; { Currently selected DN in string form }
  CRYPT_CERTINFO_PKIUSER_ID                            = 2032; { PKI user ID }
  CRYPT_CERTINFO_PKIUSER_ISSUEPASSWORD                 = 2033; { PKI user issue password }
  CRYPT_CERTINFO_PKIUSER_REVPASSWORD                   = 2034; { PKI user revocation password }

  { X.520 Distinguished Name components.  This is a composite field, the
  DN to be manipulated is selected through the addition of a
  pseudocomponent, and then one of the following is used to access the
  DN components directly }
  CRYPT_CERTINFO_COUNTRYNAME                           = 2100; { countryName }
  CRYPT_CERTINFO_STATEORPROVINCENAME                   = 2101; { stateOrProvinceName }
  CRYPT_CERTINFO_LOCALITYNAME                          = 2102; { localityName }
  CRYPT_CERTINFO_ORGANIZATIONNAME                      = 2103; { organizationName }
  CRYPT_CERTINFO_ORGANISATIONNAME                      = 2103; { = CRYPT_CERTINFO_ORGANIZATIONNAME }
  CRYPT_CERTINFO_ORGANIZATIONALUNITNAME                = 2104; { organizationalUnitName }
  CRYPT_CERTINFO_ORGANISATIONALUNITNAME                = 2104; { = CRYPT_CERTINFO_ORGANIZATIONALUNITNAME }
  CRYPT_CERTINFO_COMMONNAME                            = 2105; { commonName }

  { X.509 General Name components.  These are handled in the same way as
  the DN composite field, with the current GeneralName being selected by
  a pseudo-component after which the individual components can be
  modified through one of the following }
  CRYPT_CERTINFO_OTHERNAME_TYPEID                      = 2106; { otherName.typeID }
  CRYPT_CERTINFO_OTHERNAME_VALUE                       = 2107; { otherName.value }
  CRYPT_CERTINFO_RFC822NAME                            = 2108; { rfc822Name }
  CRYPT_CERTINFO_EMAIL                                 = 2108; { = CRYPT_CERTINFO_RFC822NAME }
  CRYPT_CERTINFO_DNSNAME                               = 2109; { dNSName }
  CRYPT_CERTINFO_DIRECTORYNAME                         = 2110; { directoryName }
  CRYPT_CERTINFO_EDIPARTYNAME_NAMEASSIGNER             = 2111; { ediPartyName.nameAssigner }
  CRYPT_CERTINFO_EDIPARTYNAME_PARTYNAME                = 2112; { ediPartyName.partyName }
  CRYPT_CERTINFO_UNIFORMRESOURCEIDENTIFIER             = 2113; { uniformResourceIdentifier }
  CRYPT_CERTINFO_IPADDRESS                             = 2114; { iPAddress }
  CRYPT_CERTINFO_REGISTEREDID                          = 2115; { registeredID }

  { X.509 certificate extensions.  Although it would be nicer to use names
  that match the extensions more closely (e.g.
  CRYPT_CERTINFO_BASICCONSTRAINTS_PATHLENCONSTRAINT), these exceed the
  32-character ANSI minimum length for unique names, and get really
  hairy once you get into the weird policy constraints extensions whose
  names wrap around the screen about three times.

⌨️ 快捷键说明

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