2008年10月24日 星期五

Ingrian手记——CryptoUtility配置详解

CryptoUtility并没有多少配置信息,因此它仅有的一些配置项也都很简单。

   1: <?xml version="1.0" encoding="utf-8" ?>
   2: <configuration>
   3:   <appSettings>
   4:     <!-- User name used to connect Ingrian servers, required. -->
   5:     <add key="ingrian.userName" value="sampleUserName"/>
   6:     
   7:     <!-- Password used to connect Ingrian servers, required. -->
   8:     <add key="ingrian.password" value="samplePassword"/>
   9:     
  10:     <!-- Key name used in cryptographic operations, optional.
  11:          If you do not provide one and nor you provide a
  12:          key name prefix, the component will use a default one. -->
  13:     <add key="ingrian.keyName" value="sampleKeyName"/>
  14:     
  15:     <!-- Key name prefix used to construct a key name for
  16:          cryptographic operations, optional. If you do not
  17:          provide one and nor you provide a key name, the
  18:          component will use a default key name. -->
  19:     <add key="ingrian.keyNamePrefix" value="sampleKeyNamePrefix"/>
  20:   </appSettings>
  21: </configuration>

ingrian.userName是必须提供的,在与Ingrian服务器连接时使用。

  1. ingrian.password是必须提供的,在与Ingrian服务器连接时使用。
  2. ingrian.keyName是可选的,指定各项操作时用的key name。如不提供,CryptoSession会再去找ingrian.keyNamePrefix这个配置项的内容,如有,就使用这个prefix,如没有,就使用组件默认提供的key name。
  3. ingrian.keyNamePrefix是可选的,指定一个prefix用来获取相应的key name。如不提供并且又没有提供key name,那么组件会使用默认提供的key name。

备注:这里所说的默认提供的key name并不是一成不变每次都是一样的,这个默认提供的key name有一个有效期,过期会变。不过这一切都不影响用户的使用,你可以将这里提到的备注忘掉。:-)

0 评论:

发表评论