diff --git a/swift-secure-enclave-tool.swift b/swift-secure-enclave-tool.swift index 216a2fa..bc9a8b5 100644 --- a/swift-secure-enclave-tool.swift +++ b/swift-secure-enclave-tool.swift @@ -172,17 +172,17 @@ if (command == "is_support_secure_enclave") { exitWith("ok:\(isSupportSecureEnclave())") } -if (command == "generate_secure_enclave_p256_ecsign_keypair") { +if (command == "generate_p256_ecsign_keypair") { let requireBio = readArgumentAsBool(index: 2, defaultValue: true) exitWith(generateSecureEnclaveP256KeyPair(sign: true, requireBio: requireBio)) } -if (command == "generate_secure_enclave_p256_ecdh_keypair") { +if (command == "generate_p256_ecdh_keypair") { let requireBio = readArgumentAsBool(index: 2, defaultValue: true) exitWith(generateSecureEnclaveP256KeyPair(sign: false, requireBio: requireBio)) } -if (command == "recover_secure_enclave_p256_ecsign_public_key") { +if (command == "recover_p256_ecsign_public_key") { if (CommandLine.arguments.count != 3) { exitWith("err:require two arguments") } @@ -191,7 +191,7 @@ if (command == "recover_secure_enclave_p256_ecsign_public_key") { exitWith(response) } -if (command == "recover_secure_enclave_p256_ecdh_public_key") { +if (command == "recover_p256_ecdh_public_key") { if (CommandLine.arguments.count != 3) { exitWith("err:require two arguments") } @@ -200,7 +200,7 @@ if (command == "recover_secure_enclave_p256_ecdh_public_key") { exitWith(response) } -if (command == "compute_secure_enclave_p256_ecsign") { +if (command == "compute_p256_ecsign") { if (CommandLine.arguments.count != 4) { exitWith("err:require three arguments") } @@ -211,7 +211,7 @@ if (command == "compute_secure_enclave_p256_ecsign") { exitWith(response) } -if (command == "compute_secure_enclave_p256_ecdh") { +if (command == "compute_p256_ecdh") { if (CommandLine.arguments.count != 4) { exitWith("err:require three arguments") } @@ -228,15 +228,15 @@ if (command == "version") { if (command == "help") { print("swift-secure-enclave-tool ") - print("help - print help") - print("version - print version") - print("is_support_secure_enclave - print is support Secure Enclave") - print("generate_secure_enclave_p256_ecsign_keypair [requireBio] - generate Secure Enclave P256 EC sign key pair") - print("generate_secure_enclave_p256_ecdh_keypair [requireBio] - generate Secure Enclave P256 EC DH key pair") - print("recover_secure_enclave_p256_ecsign_public_key - recover Secure Enclave P256 EC sign key pair") - print("recover_secure_enclave_p256_ecdh_public_key - recover Secure Enclave P256 EC DH key pair") - print("compute_secure_enclave_p256_ecsign - compure Secure Enclave P256 EC sign") - print("compute_secure_enclave_p256_ecdh - compure Secure Enclave P256 EC DH") + print("help - print help") + print("version - print version") + print("is_support_secure_enclave - is Secure Enclave supported") + print("generate_p256_ecsign_keypair [requireBio] - generate Secure Enclave P256 EC sign key pair") + print("generate_p256_ecdh_keypair [requireBio] - generate Secure Enclave P256 EC DH key pair") + print("recover_p256_ecsign_public_key - recover Secure Enclave P256 EC sign key pair") + print("recover_p256_ecdh_public_key - recover Secure Enclave P256 EC DH key pair") + print("compute_p256_ecsign - compure Secure Enclave P256 EC sign") + print("compute_p256_ecdh - compure Secure Enclave P256 EC DH") print() print("options:") print("> requireBio - true or false (default true)")