@@ -95,20 +95,36 @@ internal int Release()
95
95
/// <returns>signed bytes</returns>
96
96
public abstract byte [ ] Sign ( byte [ ] input ) ;
97
97
98
- internal virtual byte [ ] Sign ( byte [ ] input , int offset , int count )
98
+ /// <summary>
99
+ /// Produces a signature over the specified region of the <paramref name="input"/>.
100
+ /// </summary>
101
+ /// <param name="input">The bytes to produce a signature over.</param>
102
+ /// <param name="offset">The offset to specify the beginning of the region.</param>
103
+ /// <param name="count">The count to specify the end of the region.</param>
104
+ /// <returns>The signature bytes.</returns>
105
+ public virtual byte [ ] Sign ( byte [ ] input , int offset , int count )
99
106
{
100
107
throw LogHelper . LogExceptionMessage ( new NotImplementedException ( ) ) ;
101
108
}
102
109
103
110
#if NET6_0_OR_GREATER
104
- internal virtual bool Sign ( ReadOnlySpan < byte > data , Span < byte > destination , out int bytesWritten )
111
+ /// <summary>
112
+ /// Produces a signature over the <paramref name="data"/> and writes it to <paramref name="destination"/>.
113
+ /// </summary>
114
+ /// <param name="data">The bytes to produce a signature over.</param>
115
+ /// <param name="destination">The pre-allocated span where signature bytes will be placed.</param>
116
+ /// <param name="bytesWritten">The number of bytes written into the signature span.</param>
117
+ /// <returns>returns <see langword="true"/> if creation of signature succeeded, <see langword="false"/> otherwise.</returns>
118
+ public virtual bool Sign ( ReadOnlySpan < byte > data , Span < byte > destination , out int bytesWritten )
105
119
{
106
120
throw LogHelper . LogExceptionMessage ( new NotImplementedException ( ) ) ;
107
121
}
108
122
#endif
123
+ /// <summary>
109
124
/// Verifies that the <paramref name="signature"/> over <paramref name="input"/> using the
110
125
/// <see cref="SecurityKey"/> and <see cref="SignatureProvider.Algorithm"/> specified by this
111
126
/// <see cref="SignatureProvider"/> are consistent.
127
+ /// </summary>
112
128
/// <param name="input">the bytes that were signed.</param>
113
129
/// <param name="signature">signature to compare against.</param>
114
130
/// <returns>true if the computed signature matches the signature parameter, false otherwise.</returns>
0 commit comments