I am trying to to create a signature for a random string of size about 500kb , it is getting stuck there and taking around 30-40 minutes. Am I doing anything wrong ?
Function Implementation :
signData :: BS.ByteString -> IO (Maybe BS.ByteString)
signData message = do
let privateKey = readKeyFileFromMemory (BSU.fromString getPrivateKey)
case privateKey of
[Unprotected (PrivKeyDSA dsaPvtKey)] -> do
dataSign <- DSA.sign dsaPvtKey SHA1 message
let signatureVal = BS64.encode $ encodeASN1' DER $
[Start Sequence,
IntVal (DSA.sign_r dataSign),
IntVal (DSA.sign_s dataSign),
End Sequence]
pure $ Just $ signatureVal
_ -> pure $ Nothing
can anybody suggest someway to improve the performance, or if there is anything wrong with this implementation.
I am trying to to create a signature for a random string of size about 500kb , it is getting stuck there and taking around 30-40 minutes. Am I doing anything wrong ?
Function Implementation :
can anybody suggest someway to improve the performance, or if there is anything wrong with this implementation.