diff options
author | Simon Warta <[email protected]> | 2015-12-08 19:56:19 +0100 |
---|---|---|
committer | Simon Warta <[email protected]> | 2015-12-08 22:02:28 +0100 |
commit | 368d087e3973db9d8c5b70443d31c27c03dfdbef (patch) | |
tree | 9059a52c70eee8b825d9fd7fa14194940853b86a /src/cmd/fpe.cpp | |
parent | 53fca25da331d168b0433ba2e41b06aae9d17f5c (diff) |
Replace C interfaces in cli apps with C++ interfaces
Diffstat (limited to 'src/cmd/fpe.cpp')
-rw-r--r-- | src/cmd/fpe.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cmd/fpe.cpp b/src/cmd/fpe.cpp index a9da9dcb7..97ca34b24 100644 --- a/src/cmd/fpe.cpp +++ b/src/cmd/fpe.cpp @@ -107,17 +107,17 @@ u64bit decrypt_cc_number(u64bit enc_cc, return cc_derank(dec_cc); } -int fpe(int argc, char* argv[]) +int fpe(const std::vector<std::string> &args) { - if(argc != 4) + if(args.size() != 4) { - std::cout << "Usage: " << argv[0] << " cc-number acct-name passwd" << std::endl; + std::cout << "Usage: " << args[0] << " cc-number acct-name passwd" << std::endl; return 1; } - u64bit cc_number = atoll(argv[1]); - std::string acct_name = argv[2]; - std::string passwd = argv[3]; + u64bit cc_number = atoll(args[1].c_str()); + std::string acct_name = args[2]; + std::string passwd = args[3]; std::cout << "Input was: " << cc_number << ' ' << luhn_check(cc_number) << std::endl; |