Skip to content

flatheadmill/tang-encryption-provider

Repository files navigation

Run Tang Server

docker run -d -p 8080:80 --name tang \
-v tang-db:/var/db/tang \
 malaiwah/tang

Extract Thumbprint from Tang server

Install

  • jq
  • jose

Run

curl -s http://localhost:8080/adv | jq -r '.payload' | base64 --decode | jq '.keys[0]' | jose jwk thp -i -

Run Example Encrypt -> Decrypt

cd cmd
./test_run.sh

eyJhbGciOiJFQ0RILUVTIiwiY2xldmlzIjp7InBpbiI6InRhbmciLCJ0YW5nIjp7InVybCI6Imh0dHA6Ly9sb2NhbGhvc3Q6ODA4MCIsImFkdiI6eyJrZXlzIjpbeyJhbGciOiJFUzUxMiIsImNydiI6IlAtNTIxIiwia2V5X29wcyI6WyJ2ZXJpZnkiXSwia3R5IjoiRUMiLCJ4IjoiQVJXTjZSMm45bVliLW8yRE1TRGNKQ2dTX3hXc1MwT1lKMHNvTXJxMEwyc1E2WU41RmhGNzNxQVpiUkhSSTNxQVpsMm1WOXQ2N2JUOHhsdl9Ed2VEUXl4bCIsInkiOiJBZFVjUVgycUdINEtuTDcxOHV3c1M2b1c2Z1Z0RU1rLXpSMDNMOG44R29LeVluNk9qSVdoUlJUamZDaW5ndmFQTlF3OWhJNXo4T1ZseFQ4d3g2amRSc01KIn0seyJhbGciOiJFQ01SIiwiY3J2IjoiUC01MjEiLCJrZXlfb3BzIjpbImRlcml2ZUtleSJdLCJrdHkiOiJFQyIsIngiOiJBV3dlUnNDYVdYS011Wm9aSVRaalBfaU14cEtYdTdnQ0E3TFNwZmlfakJXN0FXNXY5M0oxUnFab0lncXFOdEVYRUxXeTB3UDc3WWp0RndJTml4RHMtTnY2IiwieSI6IkFjOW0xTEpPaURlV251M1ZQaHhzbmRrUVBjX0wyQmtkVXIxV2JCcEdwZEE0cDJnNUVkeTVGbzAtODI1cG1mUUM4TnV0MHpDSU51dlR0S3lremkzVFB5RUYifV19fX0sImVuYyI6IkEyNTZHQ00iLCJlcGsiOnsiY3J2IjoiUC01MjEiLCJrdHkiO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