Skip to content

Commit

Permalink
Adding overload of Sign() to RS256Algorithm (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
abatishchev authored Apr 26, 2018
1 parent a4099a8 commit a6153e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/JWT/Algorithms/RS256Algorithm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ public RS256Algorithm(X509Certificate2 cert)
public bool IsAsymmetric { get; } = true;

/// <inheritdoc />
public byte[] Sign(byte[] _, byte[] bytesToSign)
public byte[] Sign(byte[] key, byte[] bytesToSign) => Sign(bytesToSign);

public byte[] Sign(byte[] bytesToSign)
{
if (!_cert.HasPrivateKey)
throw new CryptographicException("Certificate doesn't contain private key");
Expand Down

0 comments on commit a6153e1

Please sign in to comment.