• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Md5 encoding in sketchup

Scheduled Pinned Locked Moved Developers' Forum
8 Posts 4 Posters 1.1k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    schorradt
    last edited by 14 Jan 2010, 15:34

    Hello,

    I need a function to a string md5 encoded within Ruby Sketchup.

    Can someone help me?


    http://www.henryschorradt.de/

    1 Reply Last reply Reply Quote 0
    • T Offline
      thomthom
      last edited by 14 Jan 2010, 17:06

      Think you need to copy the md5 methods from a full Ruby 1.8.0 package. Should be located under digest/md5

      Thomas Thomassen β€” SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • S Offline
        schorradt
        last edited by 14 Jan 2010, 20:04

        I have the digest.so and md5.so placed in the to the plugins directory.
        I try it with
        require 'digest'

        but i get an errormessage:
        Error Loading File mx_eftools.rb
        uninitialized constant MX_eftools::Eftool

        Does it ever so? or I do something wrong?

        The .so-files come from the following package: \ruby-1.9.1-P376-i386-mswin32.zip\lib\ruby\1.9.1\i386-mswin32\


        http://www.henryschorradt.de/

        1 Reply Last reply Reply Quote 0
        • T Offline
          thomthom
          last edited by 14 Jan 2010, 20:09

          I'd recommend matching the package in SU, which is Ruby 1.8.0. Look in the old repositories.

          Thomas Thomassen β€” SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          1 Reply Last reply Reply Quote 0
          • S Offline
            schorradt
            last edited by 14 Jan 2010, 20:29

            thx... it works πŸ˜„
            but its not easy to get an old version of ruby...
            oldversion.com is goood πŸ˜„


            http://www.henryschorradt.de/

            1 Reply Last reply Reply Quote 0
            • T Offline
              thomthom
              last edited by 14 Jan 2010, 20:56

              Think I got mine from http://www.oldapps.com/Ruby.php?old_ruby=12

              Thomas Thomassen β€” SketchUp Monkey & Coding addict
              List of my plugins and link to the CookieWare fund

              1 Reply Last reply Reply Quote 0
              • D Offline
                deathangel67300
                last edited by 14 Apr 2012, 22:02

                Hello

                I'm also trying to use a md5 hash in sketchup, but I can't find the good code to do it.
                I copied the digest.so and md5.so files in the sketchup plugin directory.
                Than I tried the following code :

                require 'digest'
                Digest;;MD5.hexdigest("Hello World\n")
                
                

                and the ruby console displays me the following error : uninitialized constant Digest::MD5>

                Can somebody help me please ?

                1 Reply Last reply Reply Quote 0
                • D Offline
                  Dan Rathbun
                  last edited by 15 Apr 2012, 12:21

                  These files do not belong in the "Plugins" dir. The should stay in the Ruby "lib" & platform dirs, and you should add those paths onto the $LOAD_PATH array.

                  These so files also need "digest.rb" and "digest/sha2.so" (at least in Ruby 1.8.6-p287,.. where "md5.rb" is no longer needed.)

                  I'm not here much anymore.

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post
                  Buy SketchPlus
                  Buy SUbD
                  Buy WrapR
                  Buy eBook
                  Buy Modelur
                  Buy Vertex Tools
                  Buy SketchCuisine
                  Buy FormFonts

                  Advertisement