aboutsummaryrefslogtreecommitdiffstats
path: root/src/math/gfpmath/point_gfp.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-01-05 23:06:31 +0000
committerlloyd <[email protected]>2010-01-05 23:06:31 +0000
commit2837e915d82e439730624f15bfc8c820475c9d65 (patch)
treeaeb1ec26572fb29c1bd60baab582699279201d71 /src/math/gfpmath/point_gfp.cpp
parent968a4250218d40f3da9eee8ff50432a3169605c6 (diff)
Clean up exceptions. Remove some unused ones like Config_Error. Make
Invalid_Argument just a typedef for std::invalid_argument. Make Botan::Exception a typedef for std::runtime_error. Make Memory_Exhaustion a public exception, and use it in other places where memory allocations can fail.
Diffstat (limited to 'src/math/gfpmath/point_gfp.cpp')
-rw-r--r--src/math/gfpmath/point_gfp.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/math/gfpmath/point_gfp.cpp b/src/math/gfpmath/point_gfp.cpp
index f95add9f7..4203a3db3 100644
--- a/src/math/gfpmath/point_gfp.cpp
+++ b/src/math/gfpmath/point_gfp.cpp
@@ -921,7 +921,7 @@ SecureVector<byte> EC2OSP(const PointGFp& point, byte format)
}
else
{
- throw Format_Error("illegal point encoding format specification");
+ throw Invalid_Argument("illegal point encoding format specification");
}
return result;
}
@@ -1078,7 +1078,7 @@ PointGFp OS2ECP(MemoryRegion<byte> const& os, const CurveGFp& curve)
}
break;
default:
- throw Format_Error("encountered illegal format specification while decoding point");
+ throw Invalid_Argument("encountered illegal format specification while decoding point");
}
z = GFpElement(curve.get_p(), BigInt(1));
//assert((x.is_trf_to_mres() && x.is_use_montgm()) || !x.is_trf_to_mres());