w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How do you connect to AWS Elastic Transcoder?
To connect to a specific region in boto, you can use: import boto.elastictranscoder transcode = boto.elastictranscoder.connect_to_region('us-west-2') transcode.create_job(...)

Categories : Python

Can I use Amazon Elastic Transcoder to only create thumbnails?
No. There are no functions for creating only thumbnails. It also is not possible to create a new transcoding job without actually transcoding anything. The input parameters require, at minimum, the name of an input video. The output parameters require, at minimum, the name of the output file and a preset ID. Parameters are checked prior to starting the job, and there are no options which would prevent the job from executing while creating a thumbnail. You can read about all of the available functions here: http://docs.aws.amazon.com/elastictranscoder/latest/developerguide/api-reference.html Give ffmpeg a look. It can be a little bit of a hassle to install, but it can create thumbnails from videos.

Categories : Ruby On Rails

Custom ClassLoader uses secret key to decrypt pre-encrypted class files (which had been encrypted with the secret key)
You already answered your own question: Your decrypting class loader still has to call defineClass. Anyone can launch your app launcher in their own class loader and simply hand your app launcher a version of java.lang.ClassLoader that will write out anything that is passed to defineClass. There is no way around defineClass (aside from native code, I suppose). If you are so worried about your classes being decompiled you're better off with an obfuscator (ProGuard or the like) or possibly an ahead of time native compiler (GCJ, Jet).

Categories : Java

Unzip password-encrypted files in c#
If you really want to use unzip, you could run first unzip -Z and the 5th element returned from that will be a 't' (text) or a 'b' (binary). If they capital, then the archive is encrypted. References: ZipInfo Manual Unzip Manual

Categories : C#

Decrypting files with a program different from what it was encrypted with
As long as the format of the file and the encryption algorithm are supported by the program you'd like to use for decrytping your file, it will work. That much for theory. In reality, even though I'm not an expert, I'd say OpenSSL is not meant for decryption of GPG encrypted files; also, AES Crypt sounds like it does just AES but GPG is a package and can do various encryption algorithms or ciphers, including AES, and even if the ciphers match, the file formats might still be incompatible and need conversion. There's a good book you could read to get a pretty good understanding of this sort of stuff (I know, I read it myself): http://www.amazon.com/Cryptography-For-Dummies-Chey-Cobb/dp/0764541889 .

Categories : Security

Vim swap and backup files for encrypted drive
One way is to just make sure there's a Temp directory at the root of the encrypted drive: set backup set directory=/Temp//,C:/Temp// set backupdir=/Temp//,C:/Temp// If there isn't one, it will fall back to the Temp directory on the C drive.

Categories : Vim

Random access to an encrypted file and write encrypted data into a specific offset in Android
The whole file has to be re-encrypted, with a new initialization vector, every time it is changed. Any other approach is insecure. ECB mode supports random access without re-encryption, but ECB does not satisfy the "secure" requirement per se. CBC mode does not support random access. CTR mode does support random access, but you must never use it this way, because it counts as nonce reuse, which results in plaintext recovery.

Categories : Android

FFMPEG Transcode so that I can view from iPhone Safari
According to the official ffmpeg documentation on http://trac.ffmpeg.org/wiki/x264EncodingGuide, this is my suggestion to encode a video file to at least Apple Quicktime compatibility : ffmpeg -i INPUT -c:v libx264 -movflags +faststart -profile:v normal -pix_fmt yuv420p -c:a aac -cutoff 15000 -b:a 128k OUTPUT.mp4 Have a nice day ;)

Categories : Iphone

How to handle elastic beanstalk deployment so it uploads only changed files
If I understand correctly, you are asking two questions: Can you push only changed files? From my understanding, I do not think you can. The entire source bundle is uploaded and could be pushed to the same or different servers. Every time you deploy it is essentially a fresh environment (depending on strategy i.e. blue-green). Local vs Production config files: In order to use different files, you either need to only provide them in the source bundle, or alter them during the deployment process by adding scripts to a .config file in .ebextensions. Take a look at customizing elastic beanstalk containers

Categories : GIT

Copying/using Python files from S3 to Amazon Elastic MapReduce at bootstrap time
If you are using boto, I recommend packaging all your Python files in an archive (.tar.gz format) and then using the cacheArchive directive in Hadoop/EMR to access it. This is what I do: Put all necessary Python files in a sub-directory, say, "required/" and test it locally. Create an archive of this: cd required && tar czvf required.tgz * Upload this archive to S3: s3cmd put required.tgz s3://yourBucket/required.tgz Add this command-line option to your steps: -cacheArchive s3://yourBucket/required.tgz#required The last step will ensure that your archive file containing Python code will be in the same directory format as in your local dev machine. To actually do step #4 in boto, here is the code: step = StreamingStep(name=jobName, mapper='...', reducer='...', ... cac

Categories : Amazon

Elastic Beanstalk's Elastic Load Balancer name
Unfortunately the answer is no to the first 2. The last one, you are able to do it, but it more or less goes against the flow of Elastic beanstalk. You would need to create your own ELB with whatever name you like and then put it in front ot the instance that is created by beanstalk. You would need need to delete the ELB that beanstalk created so that it's not sitting there costing you money. I can't remember if beanstalk boots its environments via an AutoScaling group, but if it does, you'll need to associate that AutoScaling group with your new ELB. After creating and syncing all of that up, you need to point your CNAME to your new custom made ELB. That should work.

Categories : Amazon

How do I decrypt once I have encrypted?
First get the encrypted string : final String encryptedString = Base64.encodeBase64String(encrypted) and then decrypt using: cipher.init(Cipher.DECRYPT_MODE, secretKey); final String decryptedString = new String(cipher.doFinal(Base64.decodeBase64(encryptedString)));

Categories : Java

Passed parameters without being encrypted
I've found my answer. This technique is named obfuscations. It can be used for example with https://pypi.python.org/pypi/django-unfriendly

Categories : Django

file is encrypted or is not a database
Take a look at ADO.NET adapter for Berkeley DB "Berkeley DB dbsql-adodotnet-x.x.x.zip" from http://www.oracle.com/technetwork/products/berkeleydb/downloads/index.html, that should meet your requirements.

Categories : C#

Are GET / POST params encrypted?
If you use HTTP without SSL encryption, everything is transmitted in the clear, which includes the full URL, the HTTP request/response headers, and the body of the POST request and response. If you place a password in the GET parameters, it will additionally be displayed in the address bar and quite likely saved in browser history, proxy server logs, and sent to other websites in the referrer header. Sending the password in the POST body or in the standard Authorization header avoids this obvious problem, but it is still visible to an observer who can sniff or proxy your traffic. Digest Authentication avoids transmitting the password in the clear, and only a non-reusable signature is exposed to the outside observer. It is still vulnerable to man-in-the-middle attacks; see HTTP Digest Aut

Categories : PHP

Loading an encrypted apk and decrypting on the fly
A DexClassLoader is-a ClassLoader so you should (as in I haven't done this!) be able to write an EncryptedDexClassLoader extends DexClassLoader that can deal with the encryption. Looking at the ClassLoader's protected methods - in particular getResourceAsStream() - may give you some idea as to how to proceed. I would suggest overriding all the protected methods, calling the super. implementation but logging their parameters (and reporting on the results), to get an idea of how they're used.

Categories : Android

How to tell if square reader is encrypted or not
I think you're pretty lucky to even be able to detect anything at all with javascript event listeners as you seem to imply.... Imagine the privacy intrusions we'd have all over (maybe already) if javascript stealthily downloaded from a web site could gain access to your microphone and/or microphone jack as you want to do. It might be possible, but the phone 'ifrastructure' is definitely designed to 'resist' this. I think you're going to have to write an app that installs with user permissions to access the devices you need - otherwise the mic jack device is unlikely to be available to you. BTW, credit card stripes are encoded in 7 bit, so if you are getting a string that looks 'encrypted' examine the unaltered string as 7 bit and it'll start making sense.

Categories : Javascript

Are these Eclipse variables encrypted?
It looks like you are debugging code that has been obfuscated. Specifically, the AssemblerInput class. Either you obfuscated it yourself, or you are using a 3rd-party library that has been obfuscated. Eclipse didn't do it ... It is from some Development kit. I just run the examples, nothing with the code. Well, the library in the development kit is obfuscated. Any idea on how to restore that? There is no way to restore the original symbols. The only way forward is to request a non-obfuscated version of the library from the supplier ... or find an alternative to the library.

Categories : Java

How to search an encrypted attribute?
Quick Primer to Passwords in the DB This goes to show that encryption in the database is hard, and that you shouldn't do it unless you have thought carefully through your threat model and understand what all the tradeoffs are. To be honest, I have serious doubts that an ORM can ever give you the security you need where you need encryption (for important knowledge reasons), and on PostgreSQL, it is particularly hard because of the possibility of key disclosure in the log files. In general you really need to properly protect both encrypted and plain text with regard to passwords, so you really don't want a relational interface here but a functional one, with a query running under a totally different set of permissions. Now, I can't tell in your example whether you are trying to protect p

Categories : Postgresql

is there a way to search encrypted data using LIKE?
If encrypted properly this would be nearly impossible. I'm not aware of any options in MySQL that you could use to encrypt a column like you are suggesting. So you'd need to get all results, decrypt in your application, and check against the decrypted value. If the value has instead been hashed it would be literally impossible, as the shorter string and the longer string would have completely independent hashes, and you wouldn't be able to turn the hash of the longer string back into the string itself to check.

Categories : Database

How do i get normal encrypted string
You don't need a complex code, I usually pass the code via session. The image_captcha.php creates a code like: 19m92d9193jf9. You could use md5() to generate it and a substr() to make it short. Show an image with this code, then set this value in a session variable. So the current php file can get this value without more efforts. Just access the image. image_captcha.php $basepath = DIR_VIEWS.'/captcha/'; $code = substr(md5(time()),0,7); $_SESSION['code_captcha'] = $code; $imageCaptcha = imagecreatefrompng($basepath."background.png"); $fontCaptcha = imageloadfont($basepath."anonymous.gdf"); $color = imagecolorallocate($imageCaptcha,rand(1,255),0,0); imagestring($imageCaptcha,$fontCaptcha,15,rand(3,10),$codigoCaptcha{0},$color); imagestring($imageCap

Categories : PHP

Is it possible to compare two AES encrypted string in iOS?
Maybe. It depends on the mode, padding, key, and IV (if applicable) that were used during encryption. Assuming the same key and padding are used... If the mode is ECB, then yes, you can compare strings of the cipher text like this. If the mode is CBC (or any other mode that uses an IV), and a random IV is used for each encryption, then no, comparing strings like this will not work because two identical strings will encrypt to different cipher text. The only way to compare in this case is to decrypt the strings. If the mode is CBC (or any other mode that uses an IV), and you use a fixed IV, then yes, you can compare strings of the cipher text. Update Thanks for posting the code. Given your comments, I'd reconsider if you even need to be using encryption for your use case. If this is fo

Categories : IOS

how to know a sqlite database is encrypted or not
Inspect the first 16 bytes of the database file directly, if they are equal to the string "SQLite format 300" then the file is not encrypted, and is a standard SQLite database. If something happens and a crash occurs during sqlcipher_export, the original database will be left untouched. Just run the export again on a subsequent launch.

Categories : Android

Encrypted Hstore with Rails
You could use a before_save hook to encrypt the sensitive attributes in the hash prior to being stored in the db and an after_initialize hook to decrypt when the record is instantiated. Something like the following should work: class MyModel < ActiveRecord::Base after_initialize :decrypt_sensitive before_save :encrypt_sensitive protected: def encrypt_sensitive props['some_attr'] = encrypt_and_mac(props['some_attr']) props['another_attr'] = encrypt_and_mac(props['another_attr']) end def decrypt_sensitive props['some_attr'] = decrypt_and_verify(props['some_attr']) props['another_attr'] = decrypt_and_verify(props['another_attr']) end end There will be some performance considerations with the after_initialize so you may wish to consider using a custom acces

Categories : Ruby On Rails

Encrypted Data in MySql
MySQL does not provide transparent data encryption by default. I quick googling reveals some add on products that claim to do what you are looking for (personally, do not have any experience with them): zNcrypt for MySQL MyDiamo I think you should evaluate these options.

Categories : Java

Is SQL Server password is also sent encrypted
It is encrypted only if your SQL server is set up to use SSL: Encrypting Connections to SQL Server The Encrypt=True setting I believe only marks the string as encrypted in the web.config file.

Categories : Dotnet

Should authentication token be encrypted?
Using only HMAC is a viable option: http://c2.com/cgi/wiki/wiki?HmacUserAuthentication But: Note from disadvantages No privacy. If you need privacy, you need full encryption: use SSL. HmacUserAuthentication is for security of service provision, not privacy. So encryption is a requirement if you use a plain connection. In case of SSL the additional encryption is needed only if you want to prevent the end user from reading the token.

Categories : Security

Decrypt encrypted value outside of Laravel
The Laravel Encrypter class uses Rijndael with a block size of 256 bit for encryption which is provided by the Mcrypt PHP extension. The Encrypter class works using two simple methods, encrypt() and decrypt(). An example below: <?php $secret = Crypter::encrypt('some text here'); //encrypted $decrypted_secret = Crypter::decrypt($secret); //decrypted ?> Since you're asking how to do it "outside of Laravel": The encryption and decryption is done by the encrypter class. Laravel source is public and here's the relevant part: <?php public function encrypt($value) { $iv = mcrypt_create_iv($this->getIvSize(), $this->getRandomizer()); $value = base64_encode($this->padAndMcrypt($value, $iv)); $mac = $this->hash($iv = base64_encode($iv),

Categories : PHP

Open encrypted sqlite3 in iOS
The links you provided talk about encrypting storage across the whole device; However if the goal is that the user not be able to open the database file directly then will not help you, as the only thing that protects against is your data being accessed in the event the device is stolen. It also relies on the user to set it up, the app cannot mandate that the device storage is encrypted. sqlcipher ios-tutorial

Categories : IOS

Seeing a list of recipients in an encrypted message
In the OpenPGP terminology the packet that holds the symmetric key encrypted with the public key of the recipient is knows as 'Public Key Encrypted Session Key Packet'. Defined in RFC 4880 http://tools.ietf.org/html/rfc4880#page-17 In this packet only the Key ID of the public encryption key is stored (not its User Id - which is an email address in most cases). And the recipient finds the packet that she should decrypt by searching by Key ID (actually this should be done by the PGP software). The recipient will always know that the symmetric key is decrypted properly, because otherwise the decryption algorithm will fail. The same applies to decrypting the data packet with a random key - each block cipher will fail at the end when it verifies the checksum of the last block. Even if you r

Categories : Misc

Cannot send AES encrypted messages of over 47 characters
This is true. AES is a block cypher, which means it encrypts 16 and only 16 bytes at a time. This means that you have to pad you message to be a multiple of 16, and call it multiple times , once for each block. For good encryption, you also need to add an IV, and to apply this to all your blocks. This can be very difficult to implement yourself, so you should let your libraries do it. The javax.crypto library can already do that. The solution is to select another algorithm, as found in the Javadocs (or consult the full list here). Try this for algo: AES/CBC/PKCS5Padding

Categories : Java

encrypted password with sonataadminbundle and fosuserbundle
I suspect you are not using the fos user manager to persist your object? $userManager = $this->get('fos_user.user_manager'); $userManager->update($user,true); The update method takes care of encrypting the passwords as well as several other items such as canocalizating the user name and email. The doc files have more information.

Categories : Symfony2

Does an AES encrypted string include | (pipe)?
I'm using .NET's RijndaelManaged class to encrypt and decrypt strings. You may be using that as the underlying encryption - but RijndaelManaged only deals with binary data, as is normally the case with encryption code. So presumably you're converting your string into bytes (hopefully using a sensible encoding such as UTF-8), then encrypting, then converting the encrypted bytes back into a string. Without knowing how you're converting the encrypted bytes back into a string, we can't possibly know whether the results will include a |. If you're using Convert.ToBase64String (which is probably what I'd use) you'll be fine, as | isn't used within the normal base64 alphabet. Ditto if you're just converting each byte into two hex digits. But maybe you're doing something else. (If you're us

Categories : C#

How to use base64 encrypted javascipt on a web site?
You need base64 decode function in javascript, like this one. Then use this code: using jQuery: $.get('your_base64_encoded_file.js', function(file) { eval(base64_decode(file)); });

Categories : Javascript

Read a Private Encrypted Key in Java
The following code does the work for me. (Using the bcpkix and bcprov libs from Bouncy Castle). private PrivateKey readPrivateKey(String privateKeyPath, String keyPassword) throws IOException { FileReader fileReader = new FileReader(privateKeyPath); PEMParser keyReader = new PEMParser(fileReader); JcaPEMKeyConverter converter = new JcaPEMKeyConverter(); PEMDecryptorProvider decryptionProv = new JcePEMDecryptorProviderBuilder().build(keyPassword.toCharArray()); Object keyPair = keyReader.readObject(); PrivateKeyInfo keyInfo; if (keyPair instanceof PEMEncryptedKeyPair) { PEMKeyPair decryptedKeyPair = ((PEMEncryptedKeyPair) keyPair).decryptKeyPair(decryptionProv); keyInfo = decryptedKeyPair.getPrivateKeyInfo(); } else { keyInfo = ((

Categories : Java

Pass encrypted email in url in nop commerece
You should pass it as an url encoded query string parameter and not as part of the route: http://www.test.com/home/index?email=IZoc1QJlukTro7XN4kTaRDoy7mPNS-14YjKeZsXeyt3XsL4tXbLUPQ%3D%3D%2Ffalse If you want to pass some string as part of the route you should ensure that it doesn't contain dangerous characters which is your case. Scott Hanselman wrote a nice and detailed blog post on the difficulties that you might encounter if you attempt to pass such strings as part of the route here: http://www.hanselman.com/blog/ExperimentsInWackinessAllowingPercentsAnglebracketsAndOtherNaughtyThingsInTheASPNETIISRequestURL.aspx I will quote his conclusion if you don't want to go through the entire post: After ALL this effort to get crazy stuff in the Request Path, it's worth mentioning that

Categories : Asp Net Mvc

SQlite database in iOS app is encrypted after download
The URL you are downloading is currently returning an HTML page rather than the SQLite file. Hence the .sqlite file you write to documents directory is not valid. Your code is working correct if you modify the URL Try with this URL instead, this is the actual URL which is hit on click of Download button on the Dropbox page. https://dl.dropboxusercontent.com/s/cq8y6x29e6ku65r/database.sqlite?token_hash=AAH9fdYQzZ6zj8CzhKVBGMi4LcaCRCHNKIlw88wLLskRWQ&dl=1 I tried your code and printed the list array fetched from the sqlite db and this the result I get in log, ( Ahri, Aatrox ) Hope that helps!

Categories : IOS

Storing an encrypted string in a database
No, SecureString no. It's just a pointer to the actual protected memory address, tied up to the Windows DPAPI. Whatever you do will always require some kind of coding. If your are using MS SQL, you can have the encryption tasks right there: Encrypting by passphrase, symmetric keys or asymmetric keys. Take a look at: http://blog.sqlauthority.com/2009/04/28/sql-server-introduction-to-sql-server-encryption-and-symmetric-key-encryption-tutorial-with-script/ or you might want to take a look at this great book: http://www.apress.com/9781430224648

Categories : C#

Encrypted string to Byte Array
PHP does not have byte arrays. What other languages call byte arrays are just a string of bytes one after the other, which can be accessed by their offset. PHP strings in fact do the same thing: $encrypted_body[0] -> first byte $encrypted_body[1]  ->  second byte $encrypted_body[n] -> n+1th byte So, just use PHP strings for the same purpose.

Categories : PHP

How to decode encrypted SAML response from idP with PHP?
Please check the One Login SAML php library, It is well documented and coded. You can easily use it to processResponse and the getAttributes do what you want. I know the question is old, But it may help someone still looking for the same.

Categories : PHP



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.