From c2db9769792d0a8089112977c32724b9bd9e7ae7 Mon Sep 17 00:00:00 2001 From: Ashish Bhanu Daulatabad Date: Sat, 10 Apr 2021 22:03:38 +0530 Subject: [PATCH] Feat: Elliptic Curve Diffie Hellman Key Exchange, Ciphers: Error handling --- ciphers/uint128_t.hpp | 3 +++ ciphers/uint256_t.hpp | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/ciphers/uint128_t.hpp b/ciphers/uint128_t.hpp index c11c881c1..b30ef2429 100644 --- a/ciphers/uint128_t.hpp +++ b/ciphers/uint128_t.hpp @@ -85,6 +85,9 @@ class uint128_t { public: uint128_t() = default; + template ::value, T>::type> + explicit uint128_t(T low) : s(low), f(0) {} /** * @brief Parameterized constructor * @param low lower part 8-bit unisgned integer diff --git a/ciphers/uint256_t.hpp b/ciphers/uint256_t.hpp index d4afcb6af..6e81af8bd 100644 --- a/ciphers/uint256_t.hpp +++ b/ciphers/uint256_t.hpp @@ -65,6 +65,10 @@ class uint256_t { // Constructors uint256_t() = default; + template ::value, T>::type> + explicit uint256_t(T low) : s(low), f(0) {} + /** * @brief Parameterized constructor * @param low lower part 8-bit unisgned integer