Class SignatureDSA

java.lang.Object
org.apache.sshd.common.signature.AbstractSignature
org.apache.sshd.common.signature.SignatureDSA
All Implemented Interfaces:
AlgorithmNameProvider, Signature

public class SignatureDSA extends AbstractSignature
DSA Signature
See Also:
  • Field Details

  • Constructor Details

    • SignatureDSA

      public SignatureDSA()
    • SignatureDSA

      protected SignatureDSA(String algorithm)
  • Method Details

    • sign

      public byte[] sign(SessionContext session) throws Exception
      Description copied from interface: Signature
      Compute the signature
      Specified by:
      sign in interface Signature
      Overrides:
      sign in class AbstractSignature
      Parameters:
      session - The SessionContext for calling this method - may be null if not called within a session context
      Returns:
      The signature value
      Throws:
      Exception - If failed to calculate the signature
    • putBigInteger

      public static void putBigInteger(BigInteger value, byte[] result, int offset)
    • verify

      public boolean verify(SessionContext session, byte[] sig) throws Exception
      Description copied from interface: Signature
      Verify against the given signature
      Parameters:
      session - The SessionContext for calling this method - may be null if not called within a session context
      sig - The signed data
      Returns:
      true if signature is valid
      Throws:
      Exception - If failed to extract signed data for validation