Merge pull request #152 from kazu-yamamoto/fix-p256
using pointSize in withTempPoint to fix #151.
This commit is contained in:
commit
a64f0b2e1c
@ -292,7 +292,7 @@ withNewScalarFreeze f = Scalar $ B.allocAndFreeze scalarSize f
|
|||||||
{-# NOINLINE withNewScalarFreeze #-}
|
{-# NOINLINE withNewScalarFreeze #-}
|
||||||
|
|
||||||
withTempPoint :: (Ptr P256X -> Ptr P256Y -> IO a) -> IO a
|
withTempPoint :: (Ptr P256X -> Ptr P256Y -> IO a) -> IO a
|
||||||
withTempPoint f = allocTempScrubbed scalarSize (\p -> let px = castPtr p in f px (pxToPy px))
|
withTempPoint f = allocTempScrubbed pointSize (\p -> let px = castPtr p in f px (pxToPy px))
|
||||||
|
|
||||||
withTempScalar :: (Ptr P256Scalar -> IO a) -> IO a
|
withTempScalar :: (Ptr P256Scalar -> IO a) -> IO a
|
||||||
withTempScalar f = allocTempScrubbed scalarSize (f . castPtr)
|
withTempScalar f = allocTempScrubbed scalarSize (f . castPtr)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user