From user-return-22378-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Fri Oct 5 16:56:29 2012 Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D811BD4B7 for ; Fri, 5 Oct 2012 16:56:29 +0000 (UTC) Received: (qmail 2218 invoked by uid 500); 5 Oct 2012 16:56:28 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 2187 invoked by uid 500); 5 Oct 2012 16:56:28 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 2176 invoked by uid 99); 5 Oct 2012 16:56:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2012 16:56:28 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of wordituk@gmail.com designates 209.85.223.180 as permitted sender) Received: from [209.85.223.180] (HELO mail-ie0-f180.google.com) (209.85.223.180) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Oct 2012 16:56:22 +0000 Received: by mail-ie0-f180.google.com with SMTP id e10so4223191iej.11 for ; Fri, 05 Oct 2012 09:56:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=dS+bFIPlWINxeQtFyX16VBq1av379D8JSnUnAtkS76E=; b=eVgKlwtrT3KJgBEfZpGL3AHDkUmdo65vIiy2v42ZiNibjE/Y0ugdg6D1Y9IXrYBNZa gdjA9IQfR+gbsquxYjSvMluA0adLLFSB77FbPMIup35ksNalIPow9LFQsCDiob1mDveT wuj0jQohHxsH2xogkIDwKUxYcsu0L5gw/FTMY2EUIxatUYqMR/5sHioQ5mPiD95Ni1SA HcCgJPbL6o7Hc5yv97wyhc4HWNE8ZN51p4I36htaKtqcz9PdXOpxunr6atfoazhYMXtW G3QJTzGncNj9nZTnMwSigMq7lLsaPEoTT2Q1Kudoms989ROJU3WlgtZyEbFb3sb0+u6c iTiA== Received: by 10.50.16.172 with SMTP id h12mr1768507igd.41.1349456161278; Fri, 05 Oct 2012 09:56:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.42.142.71 with HTTP; Fri, 5 Oct 2012 09:55:21 -0700 (PDT) In-Reply-To: References: From: Wordit Date: Fri, 5 Oct 2012 18:55:21 +0200 Message-ID: Subject: Re: CommonJS syntax help To: user@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 On Fri, Oct 5, 2012 at 8:53 AM, Jim Klo wrote: > What does jsSHA look like? Does it export something? I think CommonJS uses exports vs export. Oops, typo, googd catch. However, it changes nothing. I think the problem is related to how jsSHA needs to instantiate a new object first. From the docs: "Instantiate a new jsSHA object with your string to be hashed and its format (HEX or TEXT) as the parameters. Then, call getHash with the desired hash variant (SHA-1, SHA-224, SHA-256, SHA-384, or SHA-512) and output type (HEX or B64) ... var shaObj = new jsSHA("This is a Test", "TEXT"); var hash = shaObj.getHash("SHA-512", "HEX");" jsSHA is on Github at: https://github.com/Caligatio/jsSHA Is it possible that CommonJS does not allow for this kind of module usage or is there a workaround? Thanks, Marcus