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,34 @@
using System;
using Org.BouncyCastle.Crypto;
namespace Org.BouncyCastle.Bcpg.OpenPgp;
public class PgpKeyPair
{
private readonly PgpPublicKey pub;
private readonly PgpPrivateKey priv;
public long KeyId => pub.KeyId;
public PgpPublicKey PublicKey => pub;
public PgpPrivateKey PrivateKey => priv;
public PgpKeyPair(PublicKeyAlgorithmTag algorithm, AsymmetricCipherKeyPair keyPair, DateTime time)
: this(algorithm, keyPair.Public, keyPair.Private, time)
{
}
public PgpKeyPair(PublicKeyAlgorithmTag algorithm, AsymmetricKeyParameter pubKey, AsymmetricKeyParameter privKey, DateTime time)
{
pub = new PgpPublicKey(algorithm, pubKey, time);
priv = new PgpPrivateKey(pub.KeyId, pub.PublicKeyPacket, privKey);
}
public PgpKeyPair(PgpPublicKey pub, PgpPrivateKey priv)
{
this.pub = pub;
this.priv = priv;
}
}