search for: encode64

Displaying 20 results from an estimated 25 matches for "encode64".

Did you mean: encode
2006 Jan 30
4
How to encode URLs?
How does one encode URLs in ROR? Thanks Frank --------------------------------- Bring words and photos together (easily) with PhotoMail - it''s free and works with Yahoo! Mail. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060130/60280869/attachment.html
2005 Dec 14
3
Advanced routing question.
Hello All, I''m making a quick application that tracks outgoing links to referral sites. I need to track the user and the url they went to so the easiest way would be to take the entire url as a parameter and log that into the database. I was wondering if I could do something like this with routing: http://www.example.com/user/jump/http://www.myvendor.com/referral.php?
2008 Dec 13
2
Need Help in converting php encryption decryption code to ruby on rails
...p+=pp_text.to_s(2) end block=pp^pack(''H*'',Digest::MD5.hexdigest(iv)) enc_text +=block intermedi=block+iv kk='''' for j in 0..intermedi.size-1 kk +=intermedi[j].to_s(2) end iv=kk.to_i^pass.to_i i +=16 end return Base64.encode64(enc_text) end # def md5_decrypt(enc_text,password,iv_len=16) enc_text=Base64.decode64( enc_text) n=enc_text.size i=iv_len plain_text='''' pass='''' for ii in 0..password.size-1 pass +=password[ii].to_s(2) end lmp=enc_text[0,iv_len] enc='...
2012 Oct 15
2
base64 within module
I have to convert a string in base64 before placing it inside a template with puppet. Is there a function available and how? Thanks Luca -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/ZgLjlG_IeI4J. To post to this group, send email to
2007 Dec 03
1
depcryption and base64
Just wondering is anyone can explain this code to me: Base64.encode64(@key.send("#{key_type}_encrypt", text)) I have this code the encrypts some information. This part seems to work fine. I using some software on the back end that I have written in VB to decrypt it and it seems to have issues. So I just wanted to make sure that the code i have written in R...
2009 Sep 30
3
How to search and replace all urls on a HTML string using RUBY gsub
...; html_output = html.gsub(pattern,replace) The REGEX pattern is apparently working but I ''m not getting the values of $1 and $2 . When I use \\1 and \\2 it works . Thing is ... I need to encode $1 variable like this replace = "<a href=''http://mysite.com/redirect/#{Base64.encode64 ($1)}''>#{$2}</a>" and I not able to encode \\1 Can anyone help me ?
2012 Oct 17
1
generate 10 UUID records and save it it database in rails
...to create certain number of UUId records(based on the selection of drop down) and save it in the database. Now I am generating only one unique id. Can this be done in the model in this way. Or do I need to write a helper file for that?? def generate_unique_token=(value) self.secret = Base64.encode64(UUIDTools::UUID.random_create)[0..8] end In my controller........... def create @secretcode= Secretcode.new(params[:secretcode]) @user= User.new(params[:user]) @secretcode.user_id=@user @secretcode.generate_unique_token=params[:secretcode][:secret] if @secretcode.valid?...
2008 Apr 10
2
Testing an action behind HTTP Authentication
Greetings, I''m writing an integration test and would like to make sure that, with the correct credentials, I get the proper response. The problem is I don''t know how to use the ''get'' method to attach the username and password to the request. For example, when using RSpec''s Story tests.. When("I request the user information for that
2009 Apr 24
4
Long string in crypting
...d string becomes very long, too long for a varchar 255 to hold it. What can I do to make it shorter? Or should I just use text as column in the mysql db? public_key_file = ''lib/public.pem'' public_key = OpenSSL::PKey::RSA.new(File.read(public_key_file)) @encrypted_string = Base64.encode64(public_key.public_encrypt(string)) -- Posted via http://www.ruby-forum.com/.
2008 May 17
4
Setting cookies in service overloader thingo
...hash_before = blob.hash > return super(*a) > ensure > if data > data[app] = @state > blob = Marshal.dump(data) > unless hash_before == blob.hash > secure_hash = secure_blob_hasher(blob) > @cookies.identity = Base64.encode64(blob).strip + '':'' + > secure_hash > end > end > end and there''s quite a problem, check out that line, return super(*a), and look at the camping source, and soon enough one realises the reason this doesn''t work at all is that t...
2006 Jul 27
1
Passing a parameter in a method via URL
Hi there, I want to pass a parameter with a method invoked from an .rthml file. How can I do that? The method is called list_by(category) and is located in an ordinary .rhtml page. The category parameter changes depending on the context. But it can never be invoked because URLs can''t display brackets. Do you get what I mean? Can anybody help? -- Posted via
2006 Feb 17
1
Session Data Question
I am still to new to rails to feel comfortable diving into the source for the framework however my comfort is getting better. My question is this. We are storing the session data in the database using active_record_store. I was looking at the table to just get a better idea of what is going on as far as how the data is stored. I am a bit curious as to the session.data field. What method
2007 Feb 16
0
displaying images from this controllers code
...require ''base64'' require ''open-uri'' access_id = ''XXXXX'' secret_id = ''XXXXXXXXXX'' source_url = ''google.com'' timestamp = Time.now.strftime("%Y-%m-%dT%H:%M:%SZ") sig = Base64.encode64(OpenSSL::HMAC::digest(OpenSSL::Digest::Digest.new(''SHA1''), secret_id, ''Thumbnail'' + timestamp)).strip url = "http://ast.amazonaws.com/Xino?Action=Thumbnail&AWSAccessKeyId=" + access_id url << "&Signature=" + CGI.escape(s...
2007 Mar 08
1
RubyRails ActiveRecord base64 encode/decode of binary data
Hi, I have binary images stored in a table which I wish to encode/decode with base64 before reading into html object: <object data="data:image/foo;base64, ..base64 data.." />. How can I do this in RubyRails? -- Regards Andrew --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2004 Aug 20
0
Creating domain users in AD from Linux
...eady. This is the `cleartext2unicodepwd' script: #!/usr/bin/env ruby require "base64" def cleartext2unicode(cleartextpwd) quotepwd = '"' + cleartextpwd + '"' unicodepwd = quotepwd.split('').join("\0") + "\0" return Base64.encode64(unicodepwd) end if ARGV.length == 1 cleartextpwd = ARGV.shift puts "unicodePwd::" + cleartext2unicode(cleartextpwd) end Cheers Massimiliano
2006 Jul 25
6
form and pagination question
Hello, How do I get params from a form to use with a paginator? debug(params) shows this city: !map:HashWithIndifferentAccess id: "1" but in my controller, when I try to use @hotel_pages = Paginator.new self, Hotel.count(:conditions => "hotels.city_id = params[:city][:id]"), 3, @params[''page''] it doesn''t work. I suppose it''s a simple
2006 Apr 19
2
how to pass a hash as a parameter in link_to_remote
When using link_to_remote, I''d like to pass along some auxiliary data in the request. It''s a hash of dynamic data that can change with each request. But I get an error when rails trying to "stringify" the hash. For the regular link_to, it works because it turns the hash into a regular GET-like query string. I''m expecting to be able to get my hash as
2006 Jun 07
2
Hash flattening on paginator link_to
Hey I need some help with pagination and the link_to in the view. I''m trying to include a hash in the pagination link_to params and it keeps flattening out my hash. Example: Here''s my hash called @answer: "answer"=>{"6"=>"9bf31c7ff062936a96d3c8bd1f8f2ff3", "7"=>"6f4922f45568161a8cdf4ad2299f6d23"}
2004 Jan 01
1
[PATCH] Add winbind-backed NTLMSSP support to Cyrus-SASL
...s, "no secret in database"); - result = SASL_NOUSER; - goto cleanup; - } - - pass_len = strlen(auxprop_values[0].values[0]); - if (pass_len == 0) { - SETERROR(sparams->utils, "empty secret"); - result = SASL_FAIL; - goto cleanup; - } + if (params->utils->encode64(clientin, clientinlen, + childbuf+3, sizeof(childbuf)-4, + &childbuflen) != SASL_OK) { + syslog(LOG_DEBUG, + "Could not convert clientin to base64\n"); + return SASL_FAIL; + } - password = sparams->utils->malloc(sizeof(sasl_secret_t) + pass_len); -...
2007 Mar 29
2
rmagick - Incorporating dynamic images
Hi -- I have imagemagick and rmagick installed so that I can produce images from code to a file. Can anyone direct me to where I can find guidance on how to have those images included on a web page (e.g., <img src="my_dynamically_generated_image") instead of having them sent to a file? Thanks for any input. ... doug --~--~---------~--~----~------------~-------~--~----~ You