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;
        }
Beispiel #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;
            }
        }
Beispiel #3
0
 private HandshakeKey(HandshakeRivestCipher key)
 {
     inner = key;
 }