To be clear about an earlier point, if I do this: digest-as-string (apply str nonce created secret)
and then print this to the terminal, I can see it really is just a string made of these 3 items. Just a plain string, exactly what I assumed. On Mar 4, 2:25 pm, Frank Siebenlist <frank.siebenl...@gmail.com> wrote: > > digest (-> (java.security.MessageDigest/getInstance "sha1") > > .reset > > (.update nonce-bytes) > > (.update create-bytes) > > (.update secret-bytes) > > .digest) > > There may be an issue with this snippet of code as ".update" does not return > anything… i.e. nil. > > -FS. > > On Mar 4, 2013, at 11:06 AM, larry google groups <lawrencecloj...@gmail.com> > wrote: > > > > > > > > > > >> ;; Should "UsernameToken Username" really be unquoted in the following > >> line? > >> ;; All the other variable names are quoted > > > Apparently, yes. The developer at Omniture reviewed it and said my > > only problem was the way the passwordDigest was created. > > > On Mar 4, 2:02 pm, Aaron Cohen <aa...@assonance.org> wrote: > >> I think you should try to avoid the string concatenation games. I'm not > >> sure what your current code is, but I suspect you're still ending up with > >> array toString's slipping in. > > >> How about the following? > > >> On Mon, Mar 4, 2013 at 1:31 PM, larry google groups < > > >> lawrencecloj...@gmail.com> wrote: > >>> So, right now I am using this code: > > >>> (let [username (get-in @um/interactions [:omniture-api- > >>> credentials :username]) > >>> secret (get-in @um/interactions [:omniture-api-credentials :shared- > >>> secret]) > >>> nonce (DigestUtils/md5Hex (str (math/round (* (rand 1 ) 1000000)))) > >>> nonce-encoded-base64 (Base64/encodeBase64 (.getBytes nonce)) > >>> date-formatter (new SimpleDateFormat "yyyy-MM-dd'T'HH:mm:ss") > >>> formatter gmt-timezone) > >>> created (.format date-formatter (new Date)) > > >> nonce-bytes (.getBytes nonce) > >> created-bytes (.getBytes created) > >> secret-bytes (.getBytes secret) > >> digest (-> (java.security.MessageDigest/getInstance "sha1") > >> .reset > >> (.update nonce-bytes) > >> (.update create-bytes) > >> (.update secret-bytes) > >> .digest) > >> digest-base64 (Base64/encodeBase64 digest) > > >> ;; Should "UsernameToken Username" really be unquoted in the following > >> line? > >> ;; All the other variable names are quoted > >> header (apply str " UsernameToken Username=\"" username > > >> ;; You may want digest-base64 here? > >> "\"PasswordDigest=\"" digest > > >> "\" Nonce=\"" nonce-encoded-base64 > >> "\"Created=\"" created "\"")] > >> header) > > > -- > > -- > > You received this message because you are subscribed to the Google > > Groups "Clojure" group. > > To post to this group, send email to clojure@googlegroups.com > > Note that posts from new members are moderated - please be patient with > > your first post. > > To unsubscribe from this group, send email to > > clojure+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/clojure?hl=en > > --- > > You received this message because you are subscribed to the Google Groups > > "Clojure" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to clojure+unsubscr...@googlegroups.com. > > For more options, visithttps://groups.google.com/groups/opt_out. -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.