HMAC function rename for consistency

Make sure that HMAC function names conform to previously established get_*,
set_* naming convention.
This commit is contained in:
Michael Rash
2013-03-29 20:42:44 -04:00
parent d6b4a2a1c3
commit 08c9cc0938
11 changed files with 64 additions and 27 deletions

37
test/fko-python.py Executable file
View File

@@ -0,0 +1,37 @@
#!/usr/bin/python
#
# Import the Fko class and all constants.
#
from fko import *
# Create an Fko instance with an empty context.
#
fko = Fko()
fko.hmac_type(FKO_HMAC_SHA512)
# Set the SPA message (Note: Access request is default if not specified).
#
fko.spa_message("0.0.0.0,tcp/22")
# Create the final SPA data message string.
#
fko.spa_data_final("testtest", "blah")
# print the spa message.
#
print fko.spa_data()
# Print some of the data:
#
print "Version:", fko.version()
print "Timestamp:", fko.timestamp()
print "Username:", fko.username()
print "Digest Type (value):", fko.digest_type()
print "Digest Type (string):", fko.digest_type_str()
print "Digest:", fko.spa_digest()
print "HMAC Type (value):", fko.hmac_type()
print "HMAC Type (string):", fko.hmac_type_str()
print "HMAC:", fko.get_spa_hmac()
print "SPA Message:", fko.spa_message()

View File

@@ -166,7 +166,7 @@ display_ctx(fko_ctx_t ctx)
fko_get_spa_hmac_type(ctx, &hmac_type);
fko_get_spa_encryption_mode(ctx, &encryption_mode);
fko_get_encoded_data(ctx, &enc_data);
fko_get_hmac_data(ctx, &hmac_data);
fko_get_spa_hmac(ctx, &hmac_data);
fko_get_spa_digest(ctx, &spa_digest);
fko_get_spa_data(ctx, &spa_data);