summary refs log tree commit diff
path: root/crypto/src/bcpg/sig/Exportable.cs
blob: ee4c98b247e0ed3dbac9c1ba5c9bba7416af3237 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
namespace Org.BouncyCastle.Bcpg.Sig
{
    /**
    * packet giving signature creation time.
    */
    public class Exportable
        : SignatureSubpacket
    {
        public Exportable(bool critical, bool isLongLength, byte[] data)
            : base(SignatureSubpacketTag.Exportable, critical, isLongLength, data)
        {
        }

        public Exportable(bool critical, bool isExportable)
            : base(SignatureSubpacketTag.Exportable, critical, false, Utilities.BooleanToBytes(isExportable))
        {
        }

        public bool IsExportable() => Utilities.BooleanFromBytes(data);
    }
}