/// Set the creation time for the signature.
///
/// Note: this overrides the generation of a creation time when the signature
/// is generated.
///
public void SetSignatureCreationTime(bool isCritical, DateTime date)
{
list.Add(new SignatureCreationTime(isCritical, date));
}
public void SetPreferredHashAlgorithms(bool isCritical, int[] algorithms)
{
list.Add(new PreferredAlgorithms(SignatureSubpacketTag.PreferredHashAlgorithms, isCritical, algorithms));
}
public void SetPreferredSymmetricAlgorithms(bool isCritical, int[] algorithms)
{
list.Add(new PreferredAlgorithms(SignatureSubpacketTag.PreferredSymmetricAlgorithms, isCritical, algorithms));
}
public void SetPreferredCompressionAlgorithms(bool isCritical, int[] algorithms)
{
list.Add(new PreferredAlgorithms(SignatureSubpacketTag.PreferredCompressionAlgorithms, isCritical, algorithms));
}
public void SetPreferredAeadAlgorithms(bool isCritical, int[] algorithms)
{
list.Add(new PreferredAlgorithms(SignatureSubpacketTag.PreferredAeadAlgorithms, isCritical, algorithms));
}
public void AddPolicyUrl(bool isCritical, string policyUrl)
{
list.Add(new PolicyUrl(isCritical, policyUrl));
}
public void SetKeyFlags(bool isCritical, int flags)
{
list.Add(new KeyFlags(isCritical, flags));
}
[Obsolete("Use 'AddSignerUserId' instead")]
public void SetSignerUserId(bool isCritical, string userId)
{
AddSignerUserId(isCritical, userId);
}
public void AddSignerUserId(bool isCritical, string userId)
{
if (userId == null)
throw new ArgumentNullException("userId");
list.Add(new SignerUserId(isCritical, userId));
}
public void SetSignerUserId(bool isCritical, byte[] rawUserId)
{
if (rawUserId == null)
throw new ArgumentNullException("rawUserId");
list.Add(new SignerUserId(isCritical, false, rawUserId));
}
[Obsolete("Use 'AddEmbeddedSignature' instead")]
public void SetEmbeddedSignature(bool isCritical, PgpSignature pgpSignature)
{
AddEmbeddedSignature(isCritical, pgpSignature);
}
public void AddEmbeddedSignature(bool isCritical, PgpSignature pgpSignature)
{
byte[] sig = pgpSignature.GetEncoded();
byte[] data;
// TODO Should be >= ?
if (sig.Length - 1 > 256)
{
data = new byte[sig.Length - 3];
}
else
{
data = new byte[sig.Length - 2];
}
Array.Copy(sig, sig.Length - data.Length, data, 0, data.Length);
list.Add(new EmbeddedSignature(isCritical, false, data));
}
public void SetPrimaryUserId(bool isCritical, bool isPrimaryUserId)
{
list.Add(new PrimaryUserId(isCritical, isPrimaryUserId));
}
[Obsolete("Use 'AddNotationData' instead")]
public void SetNotationData(bool isCritical, bool isHumanReadable, string notationName, string notationValue)
{
AddNotationData(isCritical, isHumanReadable, notationName, notationValue);
}
public void AddNotationData(bool isCritical, bool isHumanReadable, string notationName, string notationValue)
{
list.Add(new NotationData(isCritical, isHumanReadable, notationName, notationValue));
}
///