diff --git a/include/libdap-crypto-python.h b/include/libdap-crypto-python.h index 436697ae7736b62ad4d879edefe919c9b2882eba..56e467198afedee8ad7485cd0a0fb081290040db 100644 --- a/include/libdap-crypto-python.h +++ b/include/libdap-crypto-python.h @@ -21,10 +21,10 @@ static PyObject *dap_crypto_deinit(); static PyMethodDef DapCryptoMethods[] = { {"init", dap_crypto_init, METH_VARARGS, "Initialization of the DAP (Deus Applicaions Prototypes) crypto library"}, {"deinit", dap_crypto_deinit, METH_NOARGS, "Deinitialization of the DAP (Deus Applicaions Prototypes) crypto library"}, - {"encode_base58", dap_encode_base58_py, METH_VARARGS, "Encrypts information using the base58 algorithm from the DAP crypto library"}, - {"decode_base58", dap_decode_base58_py, METH_VARARGS, "Dencrypts information using the base58 algorithm from the DAP crypto library"}, - {"encode_base64", dap_encode_base64_py, METH_VARARGS, "Encrypts information using the base64 algorithm from the DAP crypto library"}, - {"decode_base64", dap_decode_base64_py, METH_VARARGS, "Dencrypts information using the base64 algorithm from the DAP crypto library"}, + {"encodeBase58", dap_encode_base58_py, METH_VARARGS, "Encrypts information using the base58 algorithm from the DAP crypto library"}, + {"decodeBase58", dap_decode_base58_py, METH_VARARGS, "Dencrypts information using the base58 algorithm from the DAP crypto library"}, + {"encodeBase64", dap_encode_base64_py, METH_VARARGS, "Encrypts information using the base64 algorithm from the DAP crypto library"}, + {"decodeBase64", dap_decode_base64_py, METH_VARARGS, "Dencrypts information using the base64 algorithm from the DAP crypto library"}, {NULL, NULL, 0, NULL} }; diff --git a/test/test.py b/test/test.py index 0b2c73df18399af813422aa564b6984cdcee3ad0..0449baa7f85fc797f9466c09363de0d3f9622c48 100644 --- a/test/test.py +++ b/test/test.py @@ -8,13 +8,13 @@ class TestLibdapCryptoPythonModule(unittest.TestCase): self.assertTrue(crypto.deinit() == 0, "Failed deinit libdap crypto python") def test_b58(self): s = "REvgshguqwt76thuioh1`lwi0-8i-d0hjwpeocnpgh89efty7ug" - crypt = crypto.encode_base58(s) - decrypt = crypto.decode_base58(crypt) + crypt = crypto.encodeBase58(s) + decrypt = crypto.decodeBase58(crypt) self.assertTrue(s == decrypt, "Encoding and decoded information using the base58 algorithm does not match the original") def test_b64(self): s = "LindyfekrngFHJFGR23356fer" - crypt = crypto.encode_base64(s) - decrypt = crypto.decode_base64(crypt, len(s)) + crypt = crypto.encodeBase64(s) + decrypt = crypto.decodeBase64(crypt, len(s)) self.assertTrue(s == decrypt, "Encoding and decoded information using the base64 algorithm does not match the original") if __name__ == '__main__':