mirror of
https://github.com/kmackay/micro-ecc.git
synced 2026-06-05 21:14:51 +00:00
Added new API functions: uECC_curve_num_bytes() and uECC_curve_num_n_bytes().
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user