Exemplo n.º 1
0
 /// <summary>
 /// Constructs the serializer.
 /// </summary>
 /// <param name="key">key</param>
 /// <param name="iv">initialization vector</param>
 /// <param name="underlyingSerializer">underlying serializer (e.g. XmlStringSerializer or BinarySerializer)</param>
 public AesSerializer(byte[] key, byte[] iv, ISerializer underlyingSerializer)
 {
     using (EneterTrace.Entering())
     {
         myCryptoSerializer = new CryptoSerializerProvider(underlyingSerializer, key, iv);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Constructs the serializer.
 /// </summary>
 /// <param name="underlyingSerializer">underlying serializer (e.g. XmlStringSerializer or BinarySerializer)</param>
 /// <param name="passwordBasedKeyGenerator">generator of key from the password</param>
 /// <param name="keyBitSize">bit size of the key</param>
 public AesSerializer(ISerializer underlyingSerializer, DeriveBytes passwordBasedKeyGenerator, int keyBitSize)
 {
     using (EneterTrace.Entering())
     {
         myCryptoSerializer = new CryptoSerializerProvider(underlyingSerializer, passwordBasedKeyGenerator, keyBitSize);
     }
 }