Exemplo n.º 1
0
 /// <summary>
 /// Create a cipher builder configured for our DEK-Info and the passed in password.
 /// </summary>
 /// <param name="password">The password to key the cipher builder with.</param>
 /// <returns>A cipher builder for encryptors.</returns>
 public ICipherBuilder <DekInfo> Build(char[] password)
 {
     return(OpenSslUtilities.Crypt(true, password, algorithm.Name, CreateIV(algorithm)));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Create a cipher builder configured for our password and the passed in DEK-Info.
 /// </summary>
 /// <param name="algorithmDetails">The DEK-Info describing the cipher and the IV.</param>
 /// <returns>A cipher builder for decryptors.</returns>
 public ICipherBuilder <DekInfo> CreateDecryptorBuilder(DekInfo algorithmDetails)
 {
     return(OpenSslUtilities.Crypt(false, password, algorithmDetails.DekAlgName, algorithmDetails.GetIV()));
 }