Exemplo n.º 1
0
        public KeyInfo(
            Uid id,
            long ownerId,
            string name,
            KeyDataFormat format,
            byte[] data,
            JsonObject aad,
            Uid kekId,
            DateTime?activated = null,
            KeyType type       = KeyType.Secret,
            KeyStatus status   = KeyStatus.Active)
        {
            Ensure.IsValidId(ownerId, nameof(ownerId));
            Ensure.NotNullOrEmpty(name, nameof(name));
            Ensure.NotNullOrEmpty(data, nameof(data));

            Id        = id;
            OwnerId   = ownerId;
            Name      = name;
            Format    = format;
            Data      = data;
            Aad       = aad;
            KekId     = kekId;
            Activated = activated;
            Status    = status;
        }
Exemplo n.º 2
0
 public CreateKeyRequest(
     Uid id,
     KeyType type,
     string name,
     byte[] data,
     KeyDataFormat format,
     Uid kekId,
     JsonObject aad,
     JsonObject properties = null)
 {
     Id         = id;
     Type       = type;
     Name       = name;
     Data       = data;
     Format     = format;
     KekId      = kekId;
     Aad        = aad;
     Properties = properties;
 }