fromDer static method

SecpSignature fromDer(
  1. ByteData data
)

Implementation

static SecpSignature fromDer(ByteData data) {
  final nativeData = ByteSlice.fromBytes(data);
  try {
    final ffiSig = DartApi.native.secpSignature
        .fromDer(nativeData.addressOf)
        .extract((resp) => resp.asPointer<Void>());
    return SecpSignature(ffiSig, true);
  } finally {
    nativeData.dispose();
  }
}