digest

HTTP-Authentication: how to quickly test client software through BASIC and DIGEST?

巧了我就是萌 提交于 2019-12-11 23:00:17
问题 I'm developping a Java software that should make requests towards URLs over HTTP. Some of these URLs will need HTTP authentication through DIGEST or BASIC . My client software will only contact these URLs, and if HTTP response is HTTP_OK(200), it will write output into a file. Q1 : I would like to know what is the quickest and easiest way to test the HTTP authentication DIGEST and BASIC from my client side? Q2 : Have I to install this kind of server or some "test servers" already exist on the

New dataframe column as function (digest) of another one is not working for me

笑着哭i 提交于 2019-12-11 03:13:34
问题 I want to create a new computed column (the digest of the text of another column). For you to reproduce I create a df as reproducible example: df <- data.frame(name = replicate(1000, paste(sample(LETTERS, 20, replace=TRUE), collapse="")),stringsAsFactors=FALSE) > head(df,3) name 1 ZKBOZVFKNJBRSDWTUEYR 2 RQPHUECABPQZLKZPTFLG 3 FTBVBEQTRLLUGUVHDKAY Now I want a 2nd column with the digest of the 'name' col for each row This works very well but it is slow (each md5 is different and it is the

AngularJS and Digest HTTP Authentication

我与影子孤独终老i 提交于 2019-12-10 15:46:00
问题 I am trying to implement the digest auth algorithm in angular. However, the lack of knowledge about the requests angular will send stops me from perceiving that goal. My approach is to transform the request via the $httpProvider.defaults.transformRequest route. But the functions I provide function (data, headersGetter) obviously is not provided with any knowledge about the upcoming request. Since I have no knowledge about the request URI (but especially the method, such as PUT, GET etc.)at

How to sign xml with X509 cert, add digest value and signature to xml template

好久不见. 提交于 2019-12-10 10:44:50
问题 I am quite new to C# and especially new to Signing with X509. I have an xml template in which I have to add the certificate used (done) and sign the timestamp (TS-1), the binary security token and the body (id-1). Furthermore, I need to write (e.g. replace placeholders) with the digest value of these 3 elements and add the signature value. However, I do not really understand the concept, e.g. how to do this. I read a couple of websites, e.g. signing a xml document with x509 certificate but I

Rails compiles assets both with and without md5 hash, why?

独自空忆成欢 提交于 2019-12-09 02:23:38
问题 I'm relatively new to RoR and I'm curious about why Rails compiles assets both with and without md5 hash for production? I run bundle exec rake assets:clean then bundle exec rake assets:precompile My production.rb file: MyApp::Application.configure do # Code is not reloaded between requests config.cache_classes = true # Full error reports are disabled and caching is turned on config.consider_all_requests_local = false config.action_controller.perform_caching = true # Disable Rails's static

hash collision and appending data

梦想与她 提交于 2019-12-08 09:11:27
Assume I have two strings (or byte arrays) A and B which both have the same hash (with hash I mean things like MD5 or SHA1). If I concatenate another string behind it, will A+C and B+C have the same hash H' as well? What happens to C+A and C+B? I tested it with MD5 and in all my tests, appending something to the end made the hash the same, but appending at the beginning did not. Is this always true (for all inputs)? Is this true for all (well-known) hash functions? If no, is there a (well-known) hash function, where A+C and B+C will not collide (and C+A and C+B do not either)? (besides from

hash collision and appending data

时光毁灭记忆、已成空白 提交于 2019-12-08 04:11:26
问题 Assume I have two strings (or byte arrays) A and B which both have the same hash (with hash I mean things like MD5 or SHA1). If I concatenate another string behind it, will A+C and B+C have the same hash H' as well? What happens to C+A and C+B? I tested it with MD5 and in all my tests, appending something to the end made the hash the same, but appending at the beginning did not. Is this always true (for all inputs)? Is this true for all (well-known) hash functions? If no, is there a (well

Can I serialize a ruby Digest::SHA1 instance object?

久未见 提交于 2019-12-08 00:15:45
问题 G'day people, I am re-implementing an existent custom file upload service in ruby (sinatra) with redis as a backing store. Client calculates a SHA1 hash and initiates an upload uploads max 64K chunks until finished Server appends chunks to file calculates SHA1 hash of complete file to verify correct receipt Now, what I am hoping to do is use ruby (1.9.3) Digest::SHA1 << (update) operator on each chunk, (rather than having to read the ENTIRE file from scratch at the end). [Large files > 1GB].

OpenSSL HMAC-SHA1 digest does not match Crypto's

本小妞迷上赌 提交于 2019-12-07 19:01:30
问题 I've spent past 6 hours implementing message signing algorithm.. It does not work AT ALL: This is PHP code to generate digest: $payload = "thisisanapple"; $signature = hash_hmac("sha1", $payload, "thisisarandomkey"); $data = base64_encode($signature); // YzExZWRmZDliMjQzNTZjNzhlNmE3ZTdmMDE3ODJjNmMxMmM4ZTllMQ== This is JS running on the Node.js server doing the same thing: var hmac = crypto.createHmac('sha1', "thisisarandomkey"); hmac.update("thisisanapple"); var signature = hmac.digest(

Implement Digest authentication via HttpWebRequest in C#

丶灬走出姿态 提交于 2019-12-07 06:30:17
问题 Does anyone know how to screen scrape web-sites that use digest http authentication? I use code like this: var request = (HttpWebRequest)WebRequest.Create(SiteUrl); request.Credentials=new NetworkCredential(Login, Password) I'm able to access the site's mainpage, but when I try to surf to any other pages (using another request with the same credentials) I get "HTTP/1.1 400 Bad Request" error. I used Fiddler to compare requests of my C# application with Mozilla Firefox requests. 2 URLs that I