code: public static byte[] fromAsn1Der(byte[] asn1DerSignature, String algorithm) throws NoSuchAlgorithmException {
          Algorithm baseAlgorithm = AlgorithmResolver.Default.get(algorithm);
  
          // verify the given algoritm could be resolved
          if (baseAlgorithm == null) {
              throw new NoSuchAlgorithmException(algorithm);
          }
  
          // verify the given algoritm is an Ecdsa signature algorithm
          if (!(baseAlgorithm instanceof Ecdsa)) {
              throw new IllegalArgumentException("Invalid algorithm; must be an instance of ECDSA.");
          }
  
          return SignatureEncoding.fromAsn1Der(asn1DerSignature, (Ecdsa) baseAlgorithm);
      }
docs: Converts an ASN.1 DER encoded ECDSA signature to a raw signature in the form R|S
  @param asn1DerSignature An ASN.1 DER encoded signature
  @param algorithm The algorithm used to produce the given ASN.1 DER encoded signature
  @return The raw format of the given ASN.1 DER encoded signature in the form R|S