diff options
author | lloyd <[email protected]> | 2011-04-20 19:10:32 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2011-04-20 19:10:32 +0000 |
commit | 162b5ca3c330af4b09823f286cd18cc21d3c2ac4 (patch) | |
tree | 2633a5d409dd94d278b9ea16d36e185f6c5b9088 /doc/examples/fpe.cpp | |
parent | 4e86628e4a7921ba7bdfa59faf72c1307552fc1e (diff) |
It's likely that other FPE methods will be desirable once they are
standardized by NIST; the FPE currently included is just a random one
that was relatively easy to implement. Move the header to fpe_fe1.h,
and rename the function. Update the example and add some documentation
for it.
Diffstat (limited to 'doc/examples/fpe.cpp')
-rw-r--r-- | doc/examples/fpe.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/examples/fpe.cpp b/doc/examples/fpe.cpp index a7a483d65..029a761e7 100644 --- a/doc/examples/fpe.cpp +++ b/doc/examples/fpe.cpp @@ -1,5 +1,5 @@ #include <botan/botan.h> -#include <botan/fpe.h> +#include <botan/fpe_fe1.h> #include <botan/sha160.h> using namespace Botan; @@ -70,7 +70,7 @@ u64bit encrypt_cc_number(u64bit cc_number, u64bit cc_ranked = cc_rank(cc_number); - BigInt c = fpe_encrypt(n, cc_ranked, key, sha1(acct_name)); + BigInt c = FPE::fe1_encrypt(n, cc_ranked, key, sha1(acct_name)); if(c.bits() > 50) throw std::runtime_error("FPE produced a number too large"); @@ -89,7 +89,7 @@ u64bit decrypt_cc_number(u64bit enc_cc, u64bit cc_ranked = cc_rank(enc_cc); - BigInt c = fpe_decrypt(n, cc_ranked, key, sha1(acct_name)); + BigInt c = FPE::fe1_decrypt(n, cc_ranked, key, sha1(acct_name)); if(c.bits() > 50) throw std::runtime_error("FPE produced a number too large"); |