Skip to content
This repository
Browse code

Updates for using strictly AS3 library code. Change to build file to …

…only link in needed as3corelib classes that use only AS3.
  • Loading branch information...
commit 1de960fd26ef1d5874ce8d51508fd0313134c6ad 1 parent ab80dd1
Todd Anderson authored

Showing 77 changed files with 117 additions and 73 deletions. Show diff stats Hide diff stats

  1. BIN  bin/as3couchdb-0.4.1.swc
  2. BIN  bin/as3couchdb-0.4.1.swf
  3. BIN  bin/as3couchdb-0.4.swc
  4. BIN  bin/as3couchdb-0.4.swf
  5. +14 2 build.properties
  6. +12 0 build.xml
  7. BIN  examples/flex/AttachmentsFlexExample/libs/as3couchdb-0.4.1.swc
  8. BIN  examples/flex/AttachmentsFlexExample/libs/as3couchdb.swc
  9. +8 0 ...les/flex/AttachmentsFlexExample/src/com/custardbelly/couchdb/example/view/renderer/ContactItemRenderer.mxml
  10. BIN  examples/flex/AuthorizationFlexExample/libs/as3couchdb-0.4.1.swc
  11. BIN  examples/flex/BasicFlexExample/libs/as3couchdb-0.4.1.swc
  12. BIN  examples/flex/BasicFlexExample/libs/as3couchdb.swc
  13. +1 0  examples/flex/DocumentsFlexExample/.actionScriptProperties
  14. BIN  examples/flex/DocumentsFlexExample/libs/as3couchdb-0.4.1.swc
  15. BIN  examples/flex/DocumentsFlexExample/libs/as3couchdb.swc
  16. +2 1  examples/flex/DocumentsFlexExample/src/com/custardbelly/couchdb/example/view/ContactsForm.as
  17. +1 1  src/com/custardbelly/as3couchdb/as3couchdb_internal.as
  18. +2 2 src/com/custardbelly/as3couchdb/command/CouchRequestCommand.as
  19. +1 1  src/com/custardbelly/as3couchdb/command/CreateDatabaseCommand.as
  20. +1 1  src/com/custardbelly/as3couchdb/command/IRequestCommand.as
  21. +1 1  src/com/custardbelly/as3couchdb/core/CouchAttachment.as
  22. +1 5 src/com/custardbelly/as3couchdb/core/CouchDatabase.as
  23. +1 1  src/com/custardbelly/as3couchdb/core/CouchDocument.as
  24. +1 1  src/com/custardbelly/as3couchdb/core/CouchModel.as
  25. +1 1  src/com/custardbelly/as3couchdb/core/CouchModelEntity.as
  26. +1 1  src/com/custardbelly/as3couchdb/core/CouchServiceFault.as
  27. +1 1  src/com/custardbelly/as3couchdb/core/CouchServiceResult.as
  28. +1 1  src/com/custardbelly/as3couchdb/core/CouchSession.as
  29. +1 1  src/com/custardbelly/as3couchdb/core/CouchUser.as
  30. +1 1  src/com/custardbelly/as3couchdb/enum/CouchActionType.as
  31. +1 1  src/com/custardbelly/as3couchdb/enum/CouchContentType.as
  32. +1 1  src/com/custardbelly/as3couchdb/enum/CouchFaultType.as
  33. +1 1  src/com/custardbelly/as3couchdb/enum/CouchRequestMethod.as
  34. +1 1  src/com/custardbelly/as3couchdb/enum/CouchRequestStatus.as
  35. +1 1  src/com/custardbelly/as3couchdb/event/CouchEvent.as
  36. +1 1  src/com/custardbelly/as3couchdb/mediator/CouchDatabaseActionMediator.as
  37. +1 1  src/com/custardbelly/as3couchdb/mediator/CouchDocumentActionMediator.as
  38. +1 1  src/com/custardbelly/as3couchdb/mediator/CouchSessionActionMediator.as
  39. +1 1  src/com/custardbelly/as3couchdb/mediator/ICouchDatabaseActionMediator.as
  40. +1 1  src/com/custardbelly/as3couchdb/mediator/ICouchDocumentActionMediator.as
  41. +1 1  src/com/custardbelly/as3couchdb/mediator/ICouchSessionActionMediator.as
  42. +1 1  src/com/custardbelly/as3couchdb/mediator/IServiceMediator.as
  43. +1 1  src/com/custardbelly/as3couchdb/mediator/helper/AttachmentRequestQueue.as
  44. +1 1  src/com/custardbelly/as3couchdb/responder/AbstractDatabaseResponder.as
  45. +1 1  src/com/custardbelly/as3couchdb/responder/AbstractDocumentResponder.as
  46. +1 1  src/com/custardbelly/as3couchdb/responder/BasicCouchResponder.as
  47. +1 1  src/com/custardbelly/as3couchdb/responder/CreateDatabaseResponder.as
  48. +1 1  src/com/custardbelly/as3couchdb/responder/CreateDocumentResponder.as
  49. +1 1  src/com/custardbelly/as3couchdb/responder/DeleteDatabaseResponder.as
  50. +1 1  src/com/custardbelly/as3couchdb/responder/DeleteDocumentResponder.as
  51. +1 1  src/com/custardbelly/as3couchdb/responder/ICouchServiceResponder.as
  52. +1 1  src/com/custardbelly/as3couchdb/responder/ReadAllDocumentsResponder.as
  53. +1 1  src/com/custardbelly/as3couchdb/responder/ReadDatabaseResponder.as
  54. +1 1  src/com/custardbelly/as3couchdb/responder/ReadDocumentResponder.as
  55. +1 1  src/com/custardbelly/as3couchdb/responder/ReadDocumentsFromViewResponder.as
  56. +1 1  src/com/custardbelly/as3couchdb/responder/UpdateDocumentResponder.as
  57. +1 1  src/com/custardbelly/as3couchdb/serialize/CouchDatabaseReader.as
  58. +1 1  src/com/custardbelly/as3couchdb/serialize/CouchDatabaseWriter.as
  59. +1 1  src/com/custardbelly/as3couchdb/serialize/CouchDocumentReader.as
  60. +1 1  src/com/custardbelly/as3couchdb/serialize/CouchDocumentWriter.as
  61. +1 1  src/com/custardbelly/as3couchdb/serialize/ICouchDatabaseReader.as
  62. +1 1  src/com/custardbelly/as3couchdb/serialize/ICouchDatabaseWriter.as
  63. +1 1  src/com/custardbelly/as3couchdb/serialize/ICouchDocumentReader.as
  64. +1 1  src/com/custardbelly/as3couchdb/serialize/ICouchDocumentWriter.as
  65. +1 1  src/com/custardbelly/as3couchdb/service/AbstractCouchRequest.as
  66. +1 1  src/com/custardbelly/as3couchdb/service/CouchDatabaseService.as
  67. +1 1  src/com/custardbelly/as3couchdb/service/CouchDocumentService.as
  68. +1 1  src/com/custardbelly/as3couchdb/service/CouchRequest.as
  69. +1 1  src/com/custardbelly/as3couchdb/service/CouchService.as
  70. +1 1  src/com/custardbelly/as3couchdb/service/ExInCouchRequest.as
  71. +3 3 src/com/custardbelly/as3couchdb/service/HTTPCouchRequest.as
  72. +1 1  src/com/custardbelly/as3couchdb/service/HTTPSessionRequest.as
  73. +1 1  src/com/custardbelly/as3couchdb/service/ICouchDatabaseService.as
  74. +1 1  src/com/custardbelly/as3couchdb/service/ICouchDocumentService.as
  75. +1 1  src/com/custardbelly/as3couchdb/service/ICouchRequest.as
  76. +1 1  src/com/custardbelly/as3couchdb/service/ICouchService.as
  77. +17 3 src/com/custardbelly/as3couchdb/util/UUID.as
BIN  bin/as3couchdb-0.4.1.swc
Binary file not shown
BIN  bin/as3couchdb-0.4.1.swf
Binary file not shown
BIN  bin/as3couchdb-0.4.swc
Binary file not shown
BIN  bin/as3couchdb-0.4.swf
Binary file not shown
16 build.properties
@@ -13,12 +13,24 @@ optimizer.loc=${flexsdk.bin.dir}/optimizer
13 13 # asdoc.loc=${flexsdk.bin.dir}/asdoc.exe
14 14 # optimizer.loc=${flexsdk.bin.dir}/optimizer.exe
15 15
16   -# Project properties.
  16 +# Project location properties.
17 17 src.dir=${basedir}/src
18 18 lib.dir=${basedir}/lib
19 19 bin.dir=${basedir}/bin
20 20 doc.dir=${basedir}/doc
  21 +
  22 +# Directory for external code libraries.
  23 +# This is mainly used to compile in code from as3corelib that is
  24 +# ActionScript only. Specifically JSON and URI packages, and the StringUtil class.
  25 +external.dir=${basedir}/external
  26 +as3corelib.net.src=${external.dir}/com/adobe/net
  27 +as3corelib.json.src=${external.dir}/com/adobe/serialization/json
  28 +as3corelib.utils.StringUtil=${external.dir}/com/adobe/utils/StringUtil.as
  29 +
  30 +# Temporary directory when generating optimized SWF.
21 31 optimize.temp.dir=${bin.dir}/temp
22   -version.num=0.4
  32 +
  33 +# Product properties.
  34 +version.num=0.4.1
23 35 project.name=as3couchdb
24 36 library.name=${project.name}-${version.num}
12 build.xml
@@ -5,10 +5,18 @@
5 5 <!-- [as3corelib] can be found at: http://code.google.com/p/as3corelib/ -->
6 6 <!-- [as3crypto] can be found at http://code.google.com/p/as3crypto/ -->
7 7 <!-- [as3httpclientlib] can be found at: http://code.google.com/p/as3httpclientlib -->
  8 + <!-- -->
8 9 <!-- The 'lib' target locates these external libraries within a directory described in the -->
9 10 <!-- build.properties file denoted as ${lib.dir}. Make sure you have these libraries within -->
10 11 <!-- that defined directory in order to properly build the as3couchdb.swc and/or optimized -->
11 12 <!-- SWF file. -->
  13 + <!-- -->
  14 + <!-- In order to be truly ActionScript 3 compliant (and not resticted to rely on classes -->
  15 + <!-- from the Flex framework), specific sources are targeted from the as3corelib project. -->
  16 + <!-- Specifically, these are the JSON and NET packages, and the StringUtil class. -->
  17 + <!-- The project is set up to have a local checkout of as3corelib within a directory -->
  18 + <!-- called externals on the root basedir. compc looks into this directory for as3corelib -->
  19 + <!-- sources listed in build.properties. -->
12 20
13 21 <!-- Property file. -->
14 22 <property file="build.properties" />
@@ -44,11 +52,15 @@
44 52 <target name="lib" depends="clean-lib" description="Generates the library SWC.">
45 53 <echo>[EXEC] Compiling ${library.name}.swc</echo>
46 54 <exec executable="${compc.loc}" dir="${basedir}">
  55 + <!--<arg line="-load-config+=${basedir}/as3couchdb-config.xml" />-->
47 56 <arg line="-external-library-path ${flexsdk.lib.dir}" />
48 57 <arg line="-external-library-path ${playerglobal.lib.dir}" />
49 58 <arg line="-library-path+=${lib.dir}" />
50 59 <arg line="-source-path ${src.dir}" />
51 60 <arg line="-include-sources ${src.dir}" />
  61 + <arg line="-include-sources ${as3corelib.net.src}" />
  62 + <arg line="-include-sources ${as3corelib.json.src}" />
  63 + <arg line="-include-sources ${as3corelib.utils.StringUtil}" />
52 64 <arg line="-output '${bin.dir}/${library.name}.swc'" />
53 65 </exec>
54 66 <echo>[EXEC] Finished compiling ${library.name}.swc. ${library.name}.swc can be found in ${bin.dir}/.</echo>
BIN  examples/flex/AttachmentsFlexExample/libs/as3couchdb-0.4.1.swc
Binary file not shown
BIN  examples/flex/AttachmentsFlexExample/libs/as3couchdb.swc
Binary file not shown
8 .../flex/AttachmentsFlexExample/src/com/custardbelly/couchdb/example/view/renderer/ContactItemRenderer.mxml
@@ -17,6 +17,8 @@
17 17 import com.custardbelly.couchdb.example.event.ContactEvent;
18 18 import com.custardbelly.couchdb.example.model.ContactDocument;
19 19
  20 + import flash.utils.getQualifiedClassName;
  21 +
20 22 protected var _data:ContactDocument;
21 23
22 24 protected function findIconAttachment():CouchAttachment
@@ -43,6 +45,7 @@
43 45 {
44 46 var loader:Loader = new Loader();
45 47 loader.contentLoaderInfo.addEventListener(Event.COMPLETE, handleIconLoadComplete);
  48 + loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, handleLoadError);
46 49 loader.load( new URLRequest( attachment.url ) );
47 50 }
48 51 }
@@ -55,6 +58,11 @@
55 58 userImage.source = info.content as Bitmap;
56 59 }
57 60
  61 + protected function handleLoadError( evt:IOErrorEvent ):void
  62 + {
  63 + trace( "[" + getQualifiedClassName(this) + "] IOErrorEvent:: " + evt.text );
  64 + }
  65 +
58 66 protected function handleEdit():void
59 67 {
60 68 dispatchEvent( new ContactEvent( ContactEvent.EDIT, _data ) );
BIN  examples/flex/AuthorizationFlexExample/libs/as3couchdb-0.4.1.swc
Binary file not shown
BIN  examples/flex/BasicFlexExample/libs/as3couchdb-0.4.1.swc
Binary file not shown
BIN  examples/flex/BasicFlexExample/libs/as3couchdb.swc
Binary file not shown
1  examples/flex/DocumentsFlexExample/.actionScriptProperties
@@ -9,6 +9,7 @@
9 9 </excludedEntries>
10 10 </libraryPathEntry>
11 11 <libraryPathEntry kind="1" linkType="1" path="libs"/>
  12 + <libraryPathEntry kind="3" linkType="1" path="/as3couchdb/bin/as3couchdb.swc" useDefaultLinkType="false"/>
12 13 </libraryPath>
13 14 <sourceAttachmentPath/>
14 15 </compiler>
BIN  examples/flex/DocumentsFlexExample/libs/as3couchdb-0.4.1.swc
Binary file not shown
BIN  examples/flex/DocumentsFlexExample/libs/as3couchdb.swc
Binary file not shown
3  examples/flex/DocumentsFlexExample/src/com/custardbelly/couchdb/example/view/ContactsForm.as
@@ -337,9 +337,10 @@ package com.custardbelly.couchdb.example.view
337 337 protected function handleContactSave( evt:ContactEvent ):void
338 338 {
339 339 var contact:ContactDocument = evt.contact;
  340 + contact.addEventListener( CouchActionType.CREATE, handleContactSaveResult );
  341 + contact.addEventListener( CouchActionType.UPDATE, handleContactSaveResult );
340 342 contact.update();
341 343 hideEditPanel();
342   - loadContacts();
343 344 }
344 345
345 346 /**
2  src/com/custardbelly/as3couchdb/as3couchdb_internal.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: as2couchdb_internal.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
4 src/com/custardbelly/as3couchdb/command/CouchRequestCommand.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CouchRequestCommand.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
@@ -27,7 +27,7 @@
27 27 /**
28 28 * <p>Original Author: toddanderson</p>
29 29 * <p>Class File: CouchService.as</p>
30   - * <p>Version: 0.4</p>
  30 + * <p>Version: 0.4.1</p>
31 31 *
32 32 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
33 33 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/command/CreateDatabaseCommand.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CreateDatabaseCommand.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/command/IRequestCommand.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: IRequestCommand.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/core/CouchAttachment.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CouchAttachment.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
6 src/com/custardbelly/as3couchdb/core/CouchDatabase.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CouchDatabase.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
@@ -39,10 +39,6 @@ package com.custardbelly.as3couchdb.core
39 39 */
40 40 [Event(name="read", type="com.custardbelly.as3couchdb.enum.CouchActionType")]
41 41 /**
42   - * Dispatched upon successful creation and save of a database in CouchDB.
43   - */
44   - [Event(name="save", type="com.custardbelly.as3couchdb.enum.CouchActionType")]
45   - /**
46 42 * Dispatched upon successful deletion of database in CouchDB.
47 43 */
48 44 [Event(name="delete", type="com.custardbelly.as3couchdb.enum.CouchActionType")]
2  src/com/custardbelly/as3couchdb/core/CouchDocument.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CouchDocument.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/core/CouchModel.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CouchModel.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/core/CouchModelEntity.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CouchModelEntity.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/core/CouchServiceFault.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CouchServiceFault.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/core/CouchServiceResult.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CouchServiceResult.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/core/CouchSession.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CouchSession.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/core/CouchUser.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CouchUser.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/enum/CouchActionType.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CouchActionType.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/enum/CouchContentType.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CouchContentType.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/enum/CouchFaultType.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CouchFaultType.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/enum/CouchRequestMethod.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CouchRequestMethod.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/enum/CouchRequestStatus.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CouchRequestStatus.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/event/CouchEvent.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CouchEvent.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/mediator/CouchDatabaseActionMediator.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CouchDatabaseActionMediator.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/mediator/CouchDocumentActionMediator.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CouchDocumentActionMediator.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/mediator/CouchSessionActionMediator.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CouchSessionActionMediator.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/mediator/ICouchDatabaseActionMediator.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: ICouchDatabaseMediator.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/mediator/ICouchDocumentActionMediator.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: ICouchDocumentActionMediator.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/mediator/ICouchSessionActionMediator.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: ICouchSessionActionMediator.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/mediator/IServiceMediator.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: IServiceMediator.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/mediator/helper/AttachmentRequestQueue.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: AttachmentRequestQueue.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/responder/AbstractDatabaseResponder.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: AbstractDatabaseResponder.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/responder/AbstractDocumentResponder.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: AbstractDocumentResponder.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/responder/BasicCouchResponder.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: BasicCouchResponder.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/responder/CreateDatabaseResponder.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CreateDatabaseResponder.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/responder/CreateDocumentResponder.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CreateDocumentResponder.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/responder/DeleteDatabaseResponder.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: DeleteDatabaseResponder.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/responder/DeleteDocumentResponder.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: DeleteDocumentResponder.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/responder/ICouchServiceResponder.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: ICouchServiceResponder.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/responder/ReadAllDocumentsResponder.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: ReadAllDocumentsResponder.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/responder/ReadDatabaseResponder.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: ReadDatabaseResponder.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/responder/ReadDocumentResponder.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: ReadDocumentResponder.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/responder/ReadDocumentsFromViewResponder.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: ReadDocumentsFromViewResponder.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/responder/UpdateDocumentResponder.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: UpdateDocumentResponder.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/serialize/CouchDatabaseReader.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CouchDatabaseReader.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/serialize/CouchDatabaseWriter.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CouchDatabaseWriter.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/serialize/CouchDocumentReader.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CouchDocumentReader.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/serialize/CouchDocumentWriter.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CouchDocumentWriter.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/serialize/ICouchDatabaseReader.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: ICouchDatabaseReader.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/serialize/ICouchDatabaseWriter.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: ICouchDatabaseWriter.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/serialize/ICouchDocumentReader.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: ICouchDocumentReader.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/serialize/ICouchDocumentWriter.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: ICouchDocumentWriter.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/service/AbstractCouchRequest.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: AbstractCouchRequest.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/service/CouchDatabaseService.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CouchDatabaseService.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/service/CouchDocumentService.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CouchDocumentService.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/service/CouchRequest.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CouchRequest.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/service/CouchService.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: CouchService.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/service/ExInCouchRequest.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: ExInCouchRequest.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
6 src/com/custardbelly/as3couchdb/service/HTTPCouchRequest.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: HTTPCouchRequest.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
@@ -27,7 +27,6 @@
27 27 package com.custardbelly.as3couchdb.service
28 28 {
29 29 import com.adobe.net.URI;
30   - import com.adobe.protocols.dict.events.ErrorEvent;
31 30 import com.adobe.serialization.json.JSON;
32 31 import com.custardbelly.as3couchdb.core.CouchServiceFault;
33 32 import com.custardbelly.as3couchdb.core.CouchServiceResult;
@@ -36,6 +35,7 @@ package com.custardbelly.as3couchdb.service
36 35 import com.custardbelly.as3couchdb.event.CouchEvent;
37 36 import com.custardbelly.as3couchdb.responder.ICouchServiceResponder;
38 37
  38 + import flash.events.ErrorEvent;
39 39 import flash.events.Event;
40 40 import flash.events.SecurityErrorEvent;
41 41 import flash.net.URLRequest;
@@ -163,7 +163,7 @@ package com.custardbelly.as3couchdb.service
163 163 // Security and Error Events.
164 164 var message:String = "Unknown error occured.";
165 165 if( evt is ErrorEvent )
166   - message = ( evt as ErrorEvent ).message;
  166 + message = ( evt as ErrorEvent ).text;
167 167
168 168 respondToFault( CouchEvent.FAULT, 0, message );
169 169 }
2  src/com/custardbelly/as3couchdb/service/HTTPSessionRequest.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: HTTPSessionRequest.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/service/ICouchDatabaseService.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: ICouchDatabaseService.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/service/ICouchDocumentService.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: ICouchDocumentService.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/service/ICouchRequest.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: ICouchRequest.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
2  src/com/custardbelly/as3couchdb/service/ICouchService.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: ICouchService.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
20 src/com/custardbelly/as3couchdb/util/UUID.as
... ... @@ -1,7 +1,7 @@
1 1 /**
2 2 * <p>Original Author: toddanderson</p>
3 3 * <p>Class File: UUID.as</p>
4   - * <p>Version: 0.4</p>
  4 + * <p>Version: 0.4.1</p>
5 5 *
6 6 * <p>Permission is hereby granted, free of charge, to any person obtaining a copy
7 7 * of this software and associated documentation files (the "Software"), to deal
@@ -26,7 +26,10 @@
26 26 */
27 27 package com.custardbelly.as3couchdb.util
28 28 {
29   - import com.adobe.crypto.SHA1;
  29 + import com.hurlant.crypto.hash.SHA1;
  30 + import com.hurlant.crypto.hash.SHA256;
  31 +
  32 + import flash.utils.ByteArray;
30 33
31 34 /**
32 35 * UUID is a utility class to generate a unique id to be used whe creating and saving a document to a CouchDB instance.
@@ -41,7 +44,18 @@ package com.custardbelly.as3couchdb.util
41 44 */
42 45 public static function generate( url:String ):String
43 46 {
44   - return SHA1.hash( ( new Date().time.toString() + "@" + url ).toString() + "-" + Math.random().toString() );
  47 + var bytes:ByteArray = new ByteArray();
  48 + bytes.writeUTFBytes( ( new Date().time.toString() + "@" + url ).toString() + "-" + Math.random().toString() );
  49 + bytes.position = 0;
  50 +
  51 + var hash:ByteArray = new SHA256().hash( bytes );
  52 + hash.position = 0;
  53 +
  54 + var uid:String = "";
  55 + while( hash.position < hash.bytesAvailable )
  56 + uid += hash.readUnsignedInt().toString(16);
  57 +
  58 + return uid;
45 59 }
46 60 }
47 61 }

0 comments on commit 1de960f

Please sign in to comment.
Something went wrong with that request. Please try again.