Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ SignData() [2/3]

virtual byte[] System.Security.Cryptography.RSA.SignData ( byte[] data,
int offset,
int count,
HashAlgorithmName hashAlgorithm,
RSASignaturePadding padding )
inlinevirtualinherited

Definition at line 182 of file RSA.cs.

183 {
184 if (data == null)
185 {
186 throw new ArgumentNullException("data");
187 }
188 if (offset < 0 || offset > data.Length)
189 {
190 throw new ArgumentOutOfRangeException("offset");
191 }
192 if (count < 0 || count > data.Length - offset)
193 {
194 throw new ArgumentOutOfRangeException("count");
195 }
196 if (string.IsNullOrEmpty(hashAlgorithm.Name))
197 {
199 }
200 if (padding == null)
201 {
202 throw new ArgumentNullException("padding");
203 }
204 byte[] hash = HashData(data, offset, count, hashAlgorithm);
205 return SignHash(hash, hashAlgorithm, padding);
206 }
static Exception HashAlgorithmNameNullOrEmpty()
Definition RSA.cs:672
virtual byte[] HashData(byte[] data, int offset, int count, HashAlgorithmName hashAlgorithm)
Definition RSA.cs:80
virtual byte[] SignHash(byte[] hash, HashAlgorithmName hashAlgorithm, RSASignaturePadding padding)
Definition RSA.cs:70

References System.count, System.Security.Cryptography.RSA.HashAlgorithmNameNullOrEmpty(), System.Security.Cryptography.RSA.HashData(), System.Security.Cryptography.HashAlgorithmName.Name, System.offset, and System.Security.Cryptography.RSA.SignHash().