public CipherResult(EncryptionOptions eO, byte[] cipherText)
 {
     if (eO != null)
     {
         DerivationType       = eO.DerivationType;
         Salt                 = eO.Salt;
         Cost                 = eO.Cost;
         BlockSize            = eO.BlockSize;
         Parallel             = eO.Parallel;
         KeySizeInBytes       = eO.KeySizeInBytes;
         DerivationIterations = eO.DerivationIterations;
         CipherOutput         = cipherText;
         AesRijndaelIv        = eO.RijndaelIv;
     }
 }
Esempio n. 2
0
 public CipherResultText(EncryptionOptions eO, byte[] cipherText)
 {
     if (eO != null)
     {
         DerivationType       = eO.DerivationType;
         Salt                 = ScryptHandler.ByteArrayToString(eO.Salt);
         Cost                 = eO.Cost;
         BlockSize            = eO.BlockSize;
         Parallel             = eO.Parallel;
         KeySizeInBytes       = eO.KeySizeInBytes;
         DerivationIterations = eO.DerivationIterations;
         CipherOutputText     = Convert.ToBase64String(cipherText);
         AesRijndaelIv        = Convert.ToBase64String(eO.RijndaelIv);
     }
 }