private static byte[] AddEncryptionInfoToArchive(byte[] archive, EncryptionAlgorithmName encryptionAlgorithmName) { var newArchive = new byte[archive.Length + EncryptionInformationHeaderSizeBytes]; var bytes = BitConverter.GetBytes((int)encryptionAlgorithmName); archive.CopyTo(newArchive, 0); bytes.CopyTo(newArchive, archive.Length); return(newArchive); }
public EncryptionMethod(EncryptionAlgorithmName encryptionAlgorithmName) { EncryptionAlgorithm = encryptionAlgorithmName.Algorithm; }
private static IEncryptionAlgorithm ResolveEncryptionAlgorithm(EncryptionAlgorithmName algorithmNameName) => algorithmNameName switch {
public EncryptionMethod(EncryptionAlgorithmName encryptionAlgorithmName, KeyWrapAlgorithmName keyWrapAlgorithmName) : this(encryptionAlgorithmName) { KeyWrapAlgorithm = keyWrapAlgorithmName.Algorithm; }