**# Encryption Server REST API
last update 9/27/2023
Also see OpenAPI yaml
route("/egk") {
get("hello" {
call.respond("Hello!")
}
post("{device}/encryptBallot") {
val plaintextBallotJson = call.receive<PlaintextBallotJson>()
call.respond(EncryptionResponseJson))
}
post("{device}/encryptAndCastBallot") {
val plaintextBallotJson = call.receive<PlaintextBallotJson>()
call.respond(EncryptedBallotJson))
}
get("{device}/castBallot/{ccode}") {
call.respond("EgkServer cast ccode=${ccode} success")
}
get("{device}/challengeBallot/{ccode}") {
call.respond("EgkServer challenge ccode=${ccode} success")
}
get("{device}/challengeAndDecryptBallot/{ccode}") {
call.respond(PlaintextBallotJson)
}
get("{device}/sync") {
call.respond("EgkServer sync device=${device} success")
}
}