public ISignature Sign(ReadOnlySpan <byte> data, SigningContext signingContext) { var privateKey = GetPrivateKey(KeyRegistryTypes.DefaultKey); using var pooled = signingContext.SerializeToPooledBytes(); return(_cryptoContext.Sign(privateKey, data, pooled.Span)); }
/// <inheritdoc/> public bool Verify(ISignature signature, ReadOnlySpan <byte> data, SigningContext signingContext) { using var pooled = signingContext.SerializeToPooledBytes(); return(_cryptoContext.Verify(signature, data, pooled.Span)); }