Пример #1
0
 public EncryptionRecordInternal(EncryptionInfo info,
                                 BinaryRC4EncryptionHeader header, BinaryRC4EncryptionVerifier verifier)
 {
     this.info     = info;
     this.header   = header;
     this.verifier = verifier;
 }
Пример #2
0
 public void Initialize(EncryptionInfo info,
                        CipherAlgorithm cipherAlgorithm, HashAlgorithm hashAlgorithm,
                        int keyBits, int blockSize, ChainingMode chainingMode)
 {
     this.info = info;
     header    = new BinaryRC4EncryptionHeader();
     verifier  = new BinaryRC4EncryptionVerifier();
     decryptor = new BinaryRC4Decryptor(this);
     encryptor = new BinaryRC4Encryptor(this);
 }
Пример #3
0
        protected internal void CreateEncryptionInfoEntry(DirectoryNode dir)
        {
            DataSpaceMapUtils.AddDefaultDataSpace(dir);
            EncryptionInfo              info     = builder.GetEncryptionInfo();
            BinaryRC4EncryptionHeader   header   = builder.GetHeader();
            BinaryRC4EncryptionVerifier verifier = builder.GetVerifier();
            EncryptionRecord            er       = new EncryptionRecordInternal(info, header, verifier);

            DataSpaceMapUtils.CreateEncryptionEntry(dir, "EncryptionInfo", er);
        }
Пример #4
0
        public void Initialize(EncryptionInfo info, ILittleEndianInput dis)
        {
            this.info = info;
            int vMajor = info.VersionMajor;
            int vMinor = info.VersionMinor;

            Debug.Assert(vMajor == 1 && vMinor == 1);

            header    = new BinaryRC4EncryptionHeader();
            verifier  = new BinaryRC4EncryptionVerifier(dis);
            decryptor = new BinaryRC4Decryptor(this);
            encryptor = new BinaryRC4Encryptor(this);
        }