예제 #1
0
        private HandshakeRivestCipher(HandshakeRivestCipher source)
        {
            this.key    = source.key.ToArray();
            this.vector = source.vector.ToArray();

            this.position = source.position;
            this.i        = source.i;
            this.j        = source.j;
        }
예제 #2
0
        public HandshakeKey(HandshakeKeyOwnership ownership, byte[] secret, FileHash hash)
        {
            switch (ownership)
            {
            case HandshakeKeyOwnership.Initiator:
                inner = new HandshakeRivestCipher(Bytes.Hash("keyA", secret, hash.ToBytes()), 1024);
                break;

            case HandshakeKeyOwnership.Receiver:
                inner = new HandshakeRivestCipher(Bytes.Hash("keyB", secret, hash.ToBytes()), 1024);
                break;
            }
        }
예제 #3
0
 private HandshakeKey(HandshakeRivestCipher key)
 {
     inner = key;
 }