Class 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..
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NullKeyVerifier

        public NullKeyVerifier()
    • Method Detail

      • sign

        public byte[] sign​(byte[] input)
        Signs the public key.
        Specified by:
        sign in interface IKeyVerifier
        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 interface IKeyVerifier
        Parameters:
        input - Raw data sent by remote.
        signature - The signature.
        Returns:
        True, if the input could be verified, false if not.