summary refs log tree commit diff
path: root/crypto/src/asn1/pkcs/AuthenticatedSafe.cs
blob: f3dabb89c0424d703db208ca5983282d93c5d335 (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
using Org.BouncyCastle.Asn1;

namespace Org.BouncyCastle.Asn1.Pkcs
{
    public class AuthenticatedSafe
        : Asn1Encodable
    {
        private readonly ContentInfo[] info;

		public AuthenticatedSafe(
            Asn1Sequence seq)
        {
            info = new ContentInfo[seq.Count];

			for (int i = 0; i != info.Length; i++)
            {
                info[i] = ContentInfo.GetInstance(seq[i]);
            }
        }

		public AuthenticatedSafe(
            ContentInfo[] info)
        {
            this.info = (ContentInfo[]) info.Clone();
        }

		public ContentInfo[] GetContentInfo()
        {
            return (ContentInfo[]) info.Clone();
        }

		public override Asn1Object ToAsn1Object()
        {
			return new BerSequence(info);
        }
    }
}