Package org.activecomponents.udp
Class NullKeyVerifier
- java.lang.Object
-
- org.activecomponents.udp.NullKeyVerifier
-
- All Implemented Interfaces:
IKeyVerifier
public class NullKeyVerifier extends java.lang.Object implements IKeyVerifier
Implements a verification-less approach (MITM attacks are possible!)
-
-
Field Summary
Fields Modifier and Type Field Description static byte
MAGIC_BYTE
-
Constructor Summary
Constructors Constructor Description NullKeyVerifier()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
sign(byte[] input)
Signs the public key.boolean
verify(byte[] input, byte[] signature)
Verifies a signed input..
-
-
-
Field Detail
-
MAGIC_BYTE
public static final byte MAGIC_BYTE
- See Also:
- Constant Field Values
-
-
Method Detail
-
sign
public byte[] sign(byte[] input)
Signs the public key.- Specified by:
sign
in interfaceIKeyVerifier
- Parameters:
input
- Raw data of the key.- Returns:
- Signed key.
-
verify
public boolean verify(byte[] input, byte[] signature)
Verifies a signed input..- Specified by:
verify
in interfaceIKeyVerifier
- Parameters:
input
- Raw data sent by remote.signature
- The signature.- Returns:
- True, if the input could be verified, false if not.
-
-