public ViewModelProtectionHelper(DotvvmSecurityConfiguration config, JsonSerializer serializer = null)
 {
     if (config.EncryptionKey == null)
     {
         config.EncryptionKey = GenerateRandomKey(32);
     }
     if (config.SigningKey == null)
     {
         config.SigningKey = GenerateRandomKey(128);
     }
     this.EncryptionKey = config.EncryptionKey;
     this.MacKey        = config.SigningKey;
     this.Serializer    = serializer ?? new JsonSerializer();
 }
Ejemplo n.º 2
0
 public ApplicationKeyHelper(DotvvmSecurityConfiguration config)
 {
     this.config = config;
 }