Merge pull request #60 from emargolis/master

Added new API functions
This commit is contained in:
Ken MacKay
2015-11-01 08:07:32 -08:00
2 changed files with 10 additions and 0 deletions
+8
View File
@@ -1464,6 +1464,10 @@ unsigned uECC_curve_num_words(uECC_Curve curve) {
return curve->num_words;
}
unsigned uECC_curve_num_bytes(uECC_Curve curve) {
return curve->num_bytes;
}
unsigned uECC_curve_num_bits(uECC_Curve curve) {
return curve->num_bytes * 8;
}
@@ -1472,6 +1476,10 @@ unsigned uECC_curve_num_n_words(uECC_Curve curve) {
return BITS_TO_WORDS(curve->num_n_bits);
}
unsigned uECC_curve_num_n_bytes(uECC_Curve curve) {
return BITS_TO_BYTES(curve->num_n_bits);
}
unsigned uECC_curve_num_n_bits(uECC_Curve curve) {
return curve->num_n_bits;
}
+2
View File
@@ -136,8 +136,10 @@ void uECC_vli_nativeToBytes(uint8_t *bytes, int num_bytes, const uECC_word_t *na
void uECC_vli_bytesToNative(uECC_word_t *native, const uint8_t *bytes, int num_bytes);
unsigned uECC_curve_num_words(uECC_Curve curve);
unsigned uECC_curve_num_bytes(uECC_Curve curve);
unsigned uECC_curve_num_bits(uECC_Curve curve);
unsigned uECC_curve_num_n_words(uECC_Curve curve);
unsigned uECC_curve_num_n_bytes(uECC_Curve curve);
unsigned uECC_curve_num_n_bits(uECC_Curve curve);
const uECC_word_t *uECC_curve_p(uECC_Curve curve);