init commit

This commit is contained in:
2025-10-09 09:57:24 +09:00
commit 4d551bd74f
6636 changed files with 1218703 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
using System;
using System.Collections;
using Org.BouncyCastle.Crypto;
using Org.BouncyCastle.Utilities;
namespace Org.BouncyCastle.Pkcs;
public class AsymmetricKeyEntry : Pkcs12Entry
{
private readonly AsymmetricKeyParameter key;
public AsymmetricKeyParameter Key => key;
public AsymmetricKeyEntry(AsymmetricKeyParameter key)
: base(Platform.CreateHashtable())
{
this.key = key;
}
[Obsolete]
public AsymmetricKeyEntry(AsymmetricKeyParameter key, Hashtable attributes)
: base(attributes)
{
this.key = key;
}
public AsymmetricKeyEntry(AsymmetricKeyParameter key, IDictionary attributes)
: base(attributes)
{
this.key = key;
}
public override bool Equals(object obj)
{
if (!(obj is AsymmetricKeyEntry asymmetricKeyEntry))
{
return false;
}
return key.Equals(asymmetricKeyEntry.key);
}
public override int GetHashCode()
{
return ~key.GetHashCode();
}
}