Ejemplo n.º 1
0
 public CapabilityCommand() :
     base("Fetch Capability", "Fetch the capability of a Threema ID")
 {
     this.threemaIdField = this.CreateThreemaId("id");
     this.fromField      = this.CreateThreemaId("from");
     this.secretField    = this.CreateTextField("secret");
 }
Ejemplo n.º 2
0
        protected ThreemaIDField CreateThreemaId(String key, bool required)
        {
            ThreemaIDField field = new ThreemaIDField(key, required);

            this.AddField(field);
            return(field);
        }
Ejemplo n.º 3
0
 public IDLookupByEmailCommand() :
     base("ID Lookup By Email Address", "Lookup the ID linked to the given email address (will be hashed locally).")
 {
     this.emailField  = this.CreateTextField("email");
     this.fromField   = this.CreateThreemaId("from");
     this.secretField = this.CreateTextField("secret");
 }
Ejemplo n.º 4
0
 public FetchPublicKeyCommand() :
     base("Fetch Public Key", "Lookup the public key for the given ID.")
 {
     this.threemaIdField = this.CreateThreemaId("id");
     this.fromField      = this.CreateThreemaId("from");
     this.secretField    = this.CreateTextField("secret");
 }
 public IDLookupByPhoneNoCommand() :
     base("ID Lookup By Phone Number",
          "Lookup the ID linked to the given phone number (will be hashed locally).")
 {
     this.phoneNoField = this.CreateTextField("phoneNo");
     this.fromField    = this.CreateThreemaId("from");
     this.secretField  = this.CreateTextField("secret");
 }
Ejemplo n.º 6
0
 public SendSimpleMessageCommand() :
     base("Send Simple Message",
          "Send a message from standard input with server-side encryption to the given ID. 'from' is the API identity and 'secret' is the API secret. Returns the message ID on success.")
 {
     this.threemaId   = this.CreateThreemaId("to");
     this.fromField   = this.CreateThreemaId("from");
     this.secretField = this.CreateTextField("secret");
 }
Ejemplo n.º 7
0
 public SendE2ETextMessageCommand() :
     base("Send End-to-End Encrypted Text Message",
          "Encrypt standard input and send the message to the given ID. 'from' is the API identity and 'secret' is the API secret. Prints the message ID on success.")
 {
     this.threemaId       = this.CreateThreemaId("to");
     this.fromField       = this.CreateThreemaId("from");
     this.secretField     = this.CreateTextField("secret");
     this.privateKeyField = this.CreatePrivateKeyField("privateKey");
 }
 public SendE2EImageMessageCommand() :
     base("Send End-to-End Encrypted Image Message",
          "Encrypt standard input and send the message to the given ID. 'from' is the API identity and 'secret' is the API secret. Prints the message ID on success.")
 {
     this.toField         = this.CreateThreemaId("to", true);
     this.fromField       = this.CreateThreemaId("from", true);
     this.secretField     = this.CreateTextField("secret", true);
     this.privateKeyField = this.CreatePrivateKeyField("privateKey", true);
     this.imageFilePath   = this.CreateFolderField("imageFilePath", true);
 }
Ejemplo n.º 9
0
 public SendE2EFileMessageCommand() :
     base("Send End-to-End Encrypted File Message",
          "Encrypt the file (and thumbnail) and send a file message to the given ID. 'from' is the API identity and 'secret' is the API secret. Prints the message ID on success.")
 {
     this.threemaId       = this.CreateThreemaId("to");
     this.fromField       = this.CreateThreemaId("from");
     this.secretField     = this.CreateTextField("secret");
     this.privateKeyField = this.CreatePrivateKeyField("privateKey");
     this.fileField       = this.CreateFileField("file");
     this.thumbnailField  = this.CreateFileField("thumbnail", false);
 }
 public DecryptAndDownloadCommand() :
     base("Decrypt and download",
          "Decrypt a box (box from the stdin) message and download (if the message is a image or file message) the file(s) to the defined directory")
 {
     this.threemaId         = this.CreateThreemaId("id");
     this.fromField         = this.CreateThreemaId("from");
     this.secretField       = this.CreateTextField("secret");
     this.privateKeyField   = this.CreatePrivateKeyField("privateKey");
     this.messageIdField    = this.CreateTextField("messageId");
     this.nonceField        = this.CreateByteArrayField("nonce");
     this.outputFolderField = this.CreateFolderField("outputFolder", false);
 }
Ejemplo n.º 11
0
 public CreditsCommand() :
     base("Credits", "Fetch the remaining credits")
 {
     this.fromField   = this.CreateThreemaId("from");
     this.secretField = this.CreateTextField("secret");
 }