Md5 encoding in sketchup
-
Hello,
I need a function to a string md5 encoded within Ruby Sketchup.
Can someone help me?
-
Think you need to copy the md5 methods from a full Ruby 1.8.0 package. Should be located under
digest/md5
-
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::EftoolDoes 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\
-
I'd recommend matching the package in SU, which is Ruby 1.8.0. Look in the old repositories.
-
thx... it works
but its not easy to get an old version of ruby...
oldversion.com is goood -
Think I got mine from http://www.oldapps.com/Ruby.php?old_ruby=12
-
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 ?
-
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.)
Advertisement