byte[] result; DERReader der = new DERReader(input); try { DERValue derSignature = der.read(); if (! (derSignature.getValue() instanceof BitString)) throw new InvalidParameterException("Wrong signature field");  result = ((BitString) derSignature.getValue()).toByteArray(); } catch (IOException x) { InvalidParameterException y = new InvalidParameterException(); y.initCause(x); throw y; }  return result;
return input;
  public Object decodeSignature(byte[] input)  {    if (input == null)      throw new InvalidParameterException("Input bytes MUST NOT be null");    byte[] result;    DERReader der = new DERReader(input);    try      {        DERValue derSignature = der.read();        if (! (derSignature.getValue() instanceof BitString))          throw new InvalidParameterException("Wrong signature field");        result = ((BitString) derSignature.getValue()).toByteArray();      }    catch (IOException x)      {        InvalidParameterException y = new InvalidParameterException();        y.initCause(x);        throw y;      }    return result;  }