Skip to content

Commit cc6be59

Browse files
committed
2 parents 5d87e03 + d5d6141 commit cc6be59

2 files changed

Lines changed: 53 additions & 18 deletions

File tree

.github/workflows/maven.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: Java CI with Maven
10+
11+
on:
12+
push:
13+
branches: [ "main" ]
14+
pull_request:
15+
branches: [ "main" ]
16+
17+
jobs:
18+
build:
19+
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v3
24+
- name: Set up JDK 11
25+
uses: actions/setup-java@v3
26+
with:
27+
java-version: '11'
28+
distribution: 'temurin'
29+
cache: maven
30+
- name: Build with Maven
31+
run: mvn -B package --file pom.xml
32+
33+
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
34+
- name: Update dependency graph
35+
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,64 +3,64 @@ This is a fork of the Threema Message API Java SDK provided by the Threema GmbH
33
To make this possible some dependencies were upgrade and replaced.
44

55
## Console client usage
6-
###Local operations (no network communication)
7-
####Encrypt
6+
### Local operations (no network communication)
7+
#### Encrypt
88
java -jar threema-msgapi-tool.jar -e <privateKey> <publicKey>
99
Encrypt standard input using the given sender private key and recipient public key. Prints two lines to standard output: first the nonce (hex), and then the box (hex).
1010

11-
####Decrypt
11+
#### Decrypt
1212
java -jar threema-msgapi-tool.jar -d <privateKey> <publicKey> <nonce>
1313
Decrypt standard input using the given recipient private key and sender public key. The nonce must be given on the command line, and the box (hex) on standard input. Prints the decrypted message to standard output.
1414

15-
####Hash Email Address
15+
#### Hash Email Address
1616
java -jar threema-msgapi-tool.jar -h -e <email>
1717
Hash an email address for identity lookup. Prints the hash in hex.
1818

19-
####Hash Phone Number
19+
#### Hash Phone Number
2020
java -jar threema-msgapi-tool.jar -h -p <phoneNo>
2121
Hash a phone number for identity lookup. Prints the hash in hex.
2222

23-
####Generate Key Pair
23+
#### Generate Key Pair
2424
java -jar threema-msgapi-tool.jar -g <privateKeyFile> <publicKeyPath>
2525
Generate a new key pair and write the private and public keys to the respective files (in hex).
2626

27-
####Derive Public Key
27+
#### Derive Public Key
2828
java -jar threema-msgapi-tool.jar -p <privateKey>
2929
Derive the public key that corresponds with the given private key.
3030

31-
###Network operations
32-
####Send Simple Message
31+
### Network operations
32+
#### Send Simple Message
3333
java -jar threema-msgapi-tool.jar -s <to> <from> <secret>
3434
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.
3535

36-
####Send End-to-End Encrypted Text Message
36+
#### Send End-to-End Encrypted Text Message
3737
java -jar threema-msgapi-tool.jar -S <to> <from> <secret> <privateKey>
3838
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.
3939

40-
####Send End-to-End Encrypted Image Message
40+
#### Send End-to-End Encrypted Image Message
4141
java -jar threema-msgapi-tool.jar -S -i <to> <from> <secret> <privateKey> <imageFilePath>
4242
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.
4343

44-
####Send End-to-End Encrypted File Message
44+
#### Send End-to-End Encrypted File Message
4545
java -jar threema-msgapi-tool.jar -S -f <to> <from> <secret> <privateKey> <file> [thumbnail]
4646
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.
4747

48-
####ID Lookup By Email Address
48+
#### ID Lookup By Email Address
4949
java -jar threema-msgapi-tool.jar -l -e <email> <from> <secret>
5050
Lookup the ID linked to the given email address (will be hashed locally).
5151

52-
####ID Lookup By Phone Number
52+
#### ID Lookup By Phone Number
5353
java -jar threema-msgapi-tool.jar -l -p <phoneNo> <from> <secret>
5454
Lookup the ID linked to the given phone number (will be hashed locally).
5555

56-
####Fetch Public Key
56+
#### Fetch Public Key
5757
java -jar threema-msgapi-tool.jar -l -k <id> <from> <secret>
5858
Lookup the public key for the given ID.
5959

60-
####Fetch Capability
60+
#### Fetch Capability
6161
java -jar threema-msgapi-tool.jar -c <id> <from> <secret>
6262
Fetch the capability of a Threema ID
6363

64-
####Decrypt and download
64+
#### Decrypt and download
6565
java -jar threema-msgapi-tool.jar -D <id> <from> <secret> <privateKey> <messageId> <nonce> [outputFolder]
66-
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
66+
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

0 commit comments

Comments
 (0)