Search Results

Search found 3 results on 1 pages for 'whitman6732'.

Page 1/1 | 1 

  • PGP Command Line Decryption --- How to decrypt file?

    - by whitman6732
    I was sent a public key in order to decrypt a pgp-encrypted file. I imported the key with: gpg --import publickey.asc And verified it with gpg --list-keys Now, I'm trying to decrypt the file. I put the passphrase in a file called pass.txt and ran this at the command line: gpg --passphrase-fd ../../pass.txt --decrypt encryptedfile.txt.pgp --output encryptedfile.txt All it says is: Reading passphrase from file descriptor 0 ... And doesn't seem to be doing anything else. I can't tell if it's hanging or not. Is it a relatively quick process? The file is large ( about 2 GB ). Is the syntax for it correct?

    Read the article

  • jquery question - addclass to element depending on active image in rotating banner

    - by whitman6732
    I have a banner that rotates a series of three images. The active one has a display:block, while the inactive have display:none. I'm trying to match the class for the active image with an tag so that I can add an "active" class to the a tag. Having some trouble writing that function. It's adding all of the classes for each of the img elements, regardless of whether they're being displayed or not... The html markup looks like this: <div id="banner-area"> <div class="clearfix" id="promo-boxes-nav"> <ul id="banner-tabs"> <li> <ul id="page-tabs"> <li><a class="t39" href="#">1</a></li> <li><a class="t42" href="#">2</a></li> <li><a class="t49" href="#">3</a></li> </ul> </li> <li class="last">&nbsp;</li> </ul> </div> <div id="banner-content"> <img class="t39" src="http://localhost:8888/1.png" style="position: absolute; top: 0px; left: 0px; display: none; opacity: 0;"> <img class="t42" src="http://localhost:8888/2.png" style="position: absolute; top: 0px; left: 0px; display: block; opacity: 1;"> <img class="t49" src="http://localhost:8888/3.png" style="position: absolute; top: 0px; left: 0px; display: none;opacity: 0;"> </div> </div> The function in its current form looks like this: $j(document).ready(function() { $j('#banner-content') .cycle({ fx: 'fade', speed: 300, timeout: 3000, next: '.t1', pause: 1 }); if($j('#page-tabs a').attr('class')) { $j('#banner-content img').each(function() { if($j(this).attr('display','block')) { var bcClass = $j(this).attr('class'); } $j('#page-tabs li a').each(function() { if($j('#page-tabs li a').hasClass(bcClass)) { $j(this).addClass(bcClass); } }); }); } })

    Read the article

  • PHP Mcrypt - Encrypting / Decrypting file

    - by whitman6732
    Trying to write a couple of functions that will encrypt or decrypt a file and am using the class found here to try and accomplish this: http://www.itnewb.com/v/PHP-Encryption-Decryption-Using-the-MCrypt-Library-libmcrypt The encryption function below seems to work, in that it appears to encrypt the file and place it in the intended directory. I'm trying to decrypt the file now, and it just dies with the message "Failed to complete decryption" (which is coded in there...) There's nothing in the php error logs, so I'm not sure why it's failing, but as mcrypt is entirely new to me, I'm more than inclined to believe I'm doing something wrong here... Here are the functions: //ENCRYPT FILE function encryptFile() { global $cryptastic; $pass = PGPPASS; $salt = PGPSALT; $key = $cryptastic->pbkdf2($pass, $salt, 1000, 32) or die("Failed to generate secret key."); if ($handle = opendir(PATH.'/ftpd')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { $newfile = PATH.'/encrypted/'.$file.'.txt'; $msg = file_get_contents(PATH.'/ftpd/'.$file); $encrypted = $cryptastic->encrypt($msg, $key) or die("Failed to complete encryption."); $nfile = fopen($newfile, 'w'); fwrite($nfile, $encrypted); fclose($nfile); unlink(PATH.'/ftpd/'.$file); } } closedir($handle); } //DECRYPT FILE function inFTP() { global $cryptastic; $pass = PGPPASS; $salt = PGPSALT; $key = $cryptastic->pbkdf2($pass, $salt, 1000, 32) or die("Failed to generate secret key."); if ($handle = opendir(PATH.'/encrypted')) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { $newfile = PATH.'/decrypted/'.$file; $msg = PATH.'/encrypted/'.$file; $decrypted = $cryptastic->decrypt($msg, $key) or die("Failed to complete decryption."); $nfile = fopen($newfile, 'w'); fwrite($nfile, $decrypted); fclose($nfile); //unlink(PATH.'/encrypted/'.$file); } } closedir($handle); } //$crypt->decrypt($file); }

    Read the article

1