readRSAPublicKey was working fine now having trouble version 1.3

108 views
Skip to first unread message

eric s.

unread,
Dec 30, 2009, 4:32:07 PM12/30/09
to As3Crypto Discussion List
So I had just been using the binary library and all my encryption was
working just fine. Then I needed to upgrade to the latest release so
I could talk to gmail and I downloaded the latest 1.3 release. Now
when I try to load my public key I get the following error. Has
anyone else had to deal with this?

Thank you,
Eric

Error: Error #2030: End of file was encountered.
at flash.utils::ByteArray/readBytes()
at com.hurlant.util.der::DER$/parse()[/Users/eric/Documents/Flex
Builder 3/betty 30/src/com/hurlant/util/der/DER.as:124]
at com.hurlant.util.der::DER$/parse()[/Users/eric/Documents/Flex
Builder 3/betty 30/src/com/hurlant/util/der/DER.as:105]
at com.hurlant.util.der::DER$/parse()[/Users/eric/Documents/Flex
Builder 3/betty 30/src/com/hurlant/util/der/DER.as:105]
at com.hurlant.util.der::PEM$/readRSAPublicKey()[/Users/eric/
Documents/Flex Builder 3/betty 30/src/com/hurlant/util/der/PEM.as:75]
at com.desktop.helper::SigningFunctions/encryptHash()[/Users/eric/
Documents/Flex Builder 3/betty 30/src/com/desktop/helper/
SigningFunctions.as:117]
at com.desktop.helper::SigningFunctions/signPayload()[/Users/eric/
Documents/Flex Builder 3/betty 30/src/com/desktop/helper/
SigningFunctions.as:81]
at main/connectXMPP()[/Users/eric/Documents/Flex Builder 3/betty 30/
src/main.mxml:398]
at main/onCreationComplete()[/Users/eric/Documents/Flex Builder 3/
betty 30/src/main.mxml:355]
at main/__mainView_creationComplete()[/Users/eric/Documents/Flex
Builder 3/betty 30/src/main.mxml:491]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()[C:\autobuild\3.2.0\frameworks
\projects\framework\src\mx\core\UIComponent.as:9298]
at mx.core::UIComponent/set initialized()[C:\autobuild
\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:1169]
at mx.managers::LayoutManager/doPhasedInstantiation()[C:\autobuild
\3.2.0\frameworks\projects\framework\src\mx\managers\LayoutManager.as:
718]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at mx.core::UIComponent/callLaterDispatcher2()[C:\autobuild
\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8628]
at mx.core::UIComponent/callLaterDispatcher()[C:\autobuild
\3.2.0\frameworks\projects\framework\src\mx\core\UIComponent.as:8568]

eric s.

unread,
Dec 30, 2009, 5:26:44 PM12/30/09
to As3Crypto Discussion List
Well... sort of fixed? I changed one line in readRSAPublicKey from:
arr[1].position = 1; // there's a 0x00 byte up front. find out why
later. like, read a spec.
to:
arr[1].position = 0; // there's a 0x00 byte up front. find out why
later. like, read a spec.

and it worked again. I have no idea why though.

-Eric

Reply all
Reply to author
Forward
0 new messages