19 lines
No EOL
522 B
C#
19 lines
No EOL
522 B
C#
using System.Security.Cryptography;
|
|
using IdentityShroud.Core.Messages;
|
|
|
|
namespace IdentityShroud.Core.Security.Keys.Aes;
|
|
|
|
public class AesProvider : IKeyProvider
|
|
{
|
|
public bool IsPublic => false;
|
|
public KeyData CreateKey(KeyPolicy policy)
|
|
{
|
|
return new KeyData(RandomNumberGenerator.GetBytes(policy.KeySize / 8));
|
|
}
|
|
|
|
public void SetJwkParameters(Dictionary<string, string> parameters, JsonWebKey jwk)
|
|
{
|
|
// Can we use this for Jwe?
|
|
throw new NotImplementedException();
|
|
}
|
|
} |