summary refs log tree commit diff
path: root/crypto/src/openpgp/PgpOnePassSignatureList.cs
blob: c497508102eae44e534fec30b92791623c9e78cb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;

namespace Org.BouncyCastle.Bcpg.OpenPgp
{
	/// <remarks>Holder for a list of PgpOnePassSignature objects.</remarks>
    public class PgpOnePassSignatureList
		: PgpObject
    {
        private readonly PgpOnePassSignature[] sigs;

		public PgpOnePassSignatureList(
            PgpOnePassSignature[] sigs)
        {
			this.sigs = (PgpOnePassSignature[]) sigs.Clone();
        }

		public PgpOnePassSignatureList(
            PgpOnePassSignature sig)
        {
			this.sigs = new PgpOnePassSignature[]{ sig };
        }

		public PgpOnePassSignature this[int index]
		{
			get { return sigs[index]; }
		}

		public int Count
		{
			get { return sigs.Length; }
		}

		public bool IsEmpty
        {
			get { return (sigs.Length == 0); }
        }
    }
}