blob: d720ca4dc26cb309e256aa9a3bad80d67fa3a7b7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.jrt;
import java.nio.channels.SocketChannel;
/**
* Very simple crypto engine that requires connection handshaking and
* data transformation. Used to test encryption integration separate
* from TLS.
**/
public class XorCryptoEngine implements CryptoEngine {
@Override public CryptoSocket createClientCryptoSocket(SocketChannel channel, Spec spec) {
return new XorCryptoSocket(channel, false);
}
@Override public CryptoSocket createServerCryptoSocket(SocketChannel channel) {
return new XorCryptoSocket(channel, true);
}
}
|