summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/openssl.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/openssl.c b/src/openssl.c
index 11d02a0..107ec23 100644
--- a/src/openssl.c
+++ b/src/openssl.c
@@ -1965,7 +1965,7 @@ static BN_CTX *getctx(lua_State *L) {
1965} /* getctx() */ 1965} /* getctx() */
1966 1966
1967 1967
1968static int bn_tobin(lua_State *L) { 1968static int bn_toBinary(lua_State *L) {
1969 BIGNUM *bn = checksimple(L, 1, BIGNUM_CLASS); 1969 BIGNUM *bn = checksimple(L, 1, BIGNUM_CLASS);
1970 size_t len; 1970 size_t len;
1971 void *dst; 1971 void *dst;
@@ -1976,7 +1976,7 @@ static int bn_tobin(lua_State *L) {
1976 lua_pushlstring(L, dst, len); 1976 lua_pushlstring(L, dst, len);
1977 1977
1978 return 1; 1978 return 1;
1979} /* bn_tobin() */ 1979} /* bn_toBinary() */
1980 1980
1981 1981
1982static int bn__add(lua_State *L) { 1982static int bn__add(lua_State *L) {
@@ -2207,7 +2207,7 @@ static int bn_isPrime(lua_State *L) {
2207 2207
2208static BIO *getbio(lua_State *); 2208static BIO *getbio(lua_State *);
2209 2209
2210static int bn_todec(lua_State *L) { 2210static int bn_toDecimal(lua_State *L) {
2211 BIGNUM *bn = checksimple(L, 1, BIGNUM_CLASS); 2211 BIGNUM *bn = checksimple(L, 1, BIGNUM_CLASS);
2212 char *txt = NULL; 2212 char *txt = NULL;
2213 BIO *bio; 2213 BIO *bio;
@@ -2232,11 +2232,11 @@ static int bn_todec(lua_State *L) {
2232sslerr: 2232sslerr:
2233 OPENSSL_free(txt); 2233 OPENSSL_free(txt);
2234 2234
2235 return auxL_error(L, auxL_EOPENSSL, "bignum:todec"); 2235 return auxL_error(L, auxL_EOPENSSL, "bignum:toDecimal");
2236} /* bn_todec() */ 2236} /* bn_toDecimal() */
2237 2237
2238 2238
2239static int bn_tohex(lua_State *L) { 2239static int bn_toHex(lua_State *L) {
2240 BIGNUM *bn = checksimple(L, 1, BIGNUM_CLASS); 2240 BIGNUM *bn = checksimple(L, 1, BIGNUM_CLASS);
2241 char *txt = NULL; 2241 char *txt = NULL;
2242 BIO *bio; 2242 BIO *bio;
@@ -2261,27 +2261,27 @@ static int bn_tohex(lua_State *L) {
2261sslerr: 2261sslerr:
2262 OPENSSL_free(txt); 2262 OPENSSL_free(txt);
2263 2263
2264 return auxL_error(L, auxL_EOPENSSL, "bignum:tohex"); 2264 return auxL_error(L, auxL_EOPENSSL, "bignum:toHex");
2265} /* bn_tohex() */ 2265} /* bn_toHex() */
2266 2266
2267 2267
2268static const auxL_Reg bn_methods[] = { 2268static const auxL_Reg bn_methods[] = {
2269 { "add", &bn__add }, 2269 { "add", &bn__add },
2270 { "sub", &bn__sub }, 2270 { "sub", &bn__sub },
2271 { "mul", &bn__mul }, 2271 { "mul", &bn__mul },
2272 { "sqr", &bn_sqr }, 2272 { "sqr", &bn_sqr },
2273 { "idiv", &bn__idiv }, 2273 { "idiv", &bn__idiv },
2274 { "mod", &bn__mod }, 2274 { "mod", &bn__mod },
2275 { "nnmod", &bn_nnmod }, 2275 { "nnmod", &bn_nnmod },
2276 { "exp", &bn__pow }, 2276 { "exp", &bn__pow },
2277 { "gcd", &bn_gcd }, 2277 { "gcd", &bn_gcd },
2278 { "lshift", &bn__shl }, 2278 { "lshift", &bn__shl },
2279 { "rshift", &bn__shr }, 2279 { "rshift", &bn__shr },
2280 { "isPrime", &bn_isPrime }, 2280 { "isPrime", &bn_isPrime },
2281 { "tobin", &bn_tobin }, 2281 { "toBinary", &bn_toBinary },
2282 { "todec", &bn_todec }, 2282 { "toDecimal", &bn_toDecimal },
2283 { "tohex", &bn_tohex }, 2283 { "toHex", &bn_toHex },
2284 { NULL, NULL }, 2284 { NULL, NULL },
2285}; 2285};
2286 2286
2287static const auxL_Reg bn_metatable[] = { 2287static const auxL_Reg bn_metatable[] = {
@@ -2299,7 +2299,7 @@ static const auxL_Reg bn_metatable[] = {
2299 { "__lt", &bn__lt }, 2299 { "__lt", &bn__lt },
2300 { "__le", &bn__le }, 2300 { "__le", &bn__le },
2301 { "__gc", &bn__gc }, 2301 { "__gc", &bn__gc },
2302 { "__tostring", &bn_todec }, 2302 { "__tostring", &bn_toDecimal },
2303 { NULL, NULL }, 2303 { NULL, NULL },
2304}; 2304};
2305 2305