fabio85
9 years agoVisitor
roRSA in Scene Graph Application
Hi,
we are upgrading our channel to SDK 2.0 (SGS), but we have a big problem. To verify digital signature we used the roRSA and the verify method, but in Scene Graph Application roRSA cannot be used. So which component we have to use to do the same thing of the code down here?
function CheckValidSignature() as Boolean
ba = CreateObject("roByteArray")
ba.FromAsciiString(m.resultObjectString)
digest = CreateObject("roEVPDigest")
digest.Setup("sha256")
hashString = digest.Process(ba)
hashBA = CreateObject("roByteArray")
hashBA.FromHexString(hashString)
rsa = CreateObject("roRSA")
baSignature=CreateObject("roByteArray")
baSignature.FromBase64String(m.signature)
signature=baSignature
rsa = CreateObject("roRSA")
rsa.SetPublicKey("pkg:/locale/default/RSA/publicKey.txt")
rsa.SetDigestAlgorithm("sha256")
result = rsa.Verify(hashBA, signature)
if (result = 1)
return true
end if
return false
end function
we are upgrading our channel to SDK 2.0 (SGS), but we have a big problem. To verify digital signature we used the roRSA and the verify method, but in Scene Graph Application roRSA cannot be used. So which component we have to use to do the same thing of the code down here?
function CheckValidSignature() as Boolean
ba = CreateObject("roByteArray")
ba.FromAsciiString(m.resultObjectString)
digest = CreateObject("roEVPDigest")
digest.Setup("sha256")
hashString = digest.Process(ba)
hashBA = CreateObject("roByteArray")
hashBA.FromHexString(hashString)
rsa = CreateObject("roRSA")
baSignature=CreateObject("roByteArray")
baSignature.FromBase64String(m.signature)
signature=baSignature
rsa = CreateObject("roRSA")
rsa.SetPublicKey("pkg:/locale/default/RSA/publicKey.txt")
rsa.SetDigestAlgorithm("sha256")
result = rsa.Verify(hashBA, signature)
if (result = 1)
return true
end if
return false
end function