예제 #1
0
파일: Marchive.cs 프로젝트: f00/Marchive
        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;
 }
예제 #3
0
파일: Marchive.cs 프로젝트: f00/Marchive
 private static IEncryptionAlgorithm ResolveEncryptionAlgorithm(EncryptionAlgorithmName algorithmNameName) =>
 algorithmNameName switch
 {
 public EncryptionMethod(EncryptionAlgorithmName encryptionAlgorithmName, KeyWrapAlgorithmName keyWrapAlgorithmName)
     : this(encryptionAlgorithmName)
 {
     KeyWrapAlgorithm = keyWrapAlgorithmName.Algorithm;
 }