How Can i use the key file Generated by RSACryptoServiceProvider to encrypt with php?

I need to be able to encrypt data in PHP using a public key generate by .NET(RSACryptoServiceProvider).  I will then decrypt the data later in C# using the private key.
Code Snippet
<RSAKeyValue><Modulus>xU5JyaPNDKXI/h/uo5Vk89wZSz3zsB1+c+1IMYIQa+mCmuRCRPuoBI7ODSV2ndP6grfhdrWEzhpZtkI3SThbBh/3t+tfZ2PF8Iyv9ECN07V64nPCiJGhAnfENE+J9UD9Kw5czXHgZcBbpM5N0VfXmLSleaS65DDoNPtoStVy7ss=</Modulus><Exponent>AQAB</Exponent><P>4ScAjVrPZii/6lICAP2yDQiNEmNL74+5AcxNVDI0IombfDPIygrqEWmuDu0pngApQak7XnEnLbaDChILFiHPZQ==</P><Q>4FaYlse+cjrlPD/jk+GsTJeuP7yuQx8ztjVnQWVh6GKQP+uk1dAl6kcZOfLNR6LWwE3CSygt8PthTEw96Zbabw==</Q><DP>XvXtNLE9UjATqYeHEtXtV7Pok/3PVC3A8PIzFzTJaluxeXP51sU9rbRt1hvO9rXIsMnooU+GH7Cfmgq8JEyERQ==</DP><DQ>HXkC/vwq9xLpvuqd2XXSjxV2XQVK16Knxo5pjFvnawJX9S3eMADymj7Q/534firUj9snZXxX3MsJ015I3AFnnQ==</DQ><InverseQ>AM0fVCE3n2FKf2zb3CcDEge1Ko35VvMEL+LXgR87QwO2HScZSuLevGLi2SSAkB1vu8RSNzB028SZReeOZWnq4Q==</InverseQ><D>fI+GKdRNOTTYhQZnw8Im74T+OvArjf2wvUMJlqfD8jyDBYIhDCfL1MTK9KW4Er+moSuxHR5Pb0ZXaKa4/HKlk0aJ1jB2C+jg7zTSuPRNuS16BpVHaJYsQurCwZwElXMum+GxeXK/h3wXWq5HwebjqZr0aLUMZKRcweDPRoVFiRE=</D></RSAKeyValue>
As you see this code snippet is a xml format private key. at .net platform,which can use encrypt or dencrypt.
i have try the Extension Crypt RSA ( http://pear.php.net/reference/Crypt_RSA-1.0.0/elementindex_Crypt_RSA.html ) to help me encrypt data by php.but it haven't return a currect result. the data encrypted by php cann't dencrypt by c#.
does the RSA algorithm provider by Crypt_RSA can give a stand result as c#?
BTW :i just use the xmlkeystring like this.
Code Snippet
<?php
require_once("Crypt/RSA.php");
require_once("includes/Utils.class.php");
    $public_key_string = simplexml_load_string("<RSAKeyValue><Modulus>xU5JyaPNDKXI/h/uo5Vk89wZSz3zsB1+c+1IMYIQa+mCmuRCRPuoBI7ODSV2ndP6grfhdrWEzhpZtkI3SThbBh/3t+tfZ2PF8Iyv9ECN07V64nPCiJGhAnfENE+J9UD9Kw5czXHgZcBbpM5N0VfXmLSleaS65DDoNPtoStVy7ss=</Modulus><Exponent>AQAB</Exponent><P>4ScAjVrPZii/6lICAP2yDQiNEmNL74+5AcxNVDI0IombfDPIygrqEWmuDu0pngApQak7XnEnLbaDChILFiHPZQ==</P><Q>4FaYlse+cjrlPD/jk+GsTJeuP7yuQx8ztjVnQWVh6GKQP+uk1dAl6kcZOfLNR6LWwE3CSygt8PthTEw96Zbabw==</Q><DP>XvXtNLE9UjATqYeHEtXtV7Pok/3PVC3A8PIzFzTJaluxeXP51sU9rbRt1hvO9rXIsMnooU+GH7Cfmgq8JEyERQ==</DP><DQ>HXkC/vwq9xLpvuqd2XXSjxV2XQVK16Knxo5pjFvnawJX9S3eMADymj7Q/534firUj9snZXxX3MsJ015I3AFnnQ==</DQ><InverseQ>AM0fVCE3n2FKf2zb3CcDEge1Ko35VvMEL+LXgR87QwO2HScZSuLevGLi2SSAkB1vu8RSNzB028SZReeOZWnq4Q==</InverseQ><D>fI+GKdRNOTTYhQZnw8Im74T+OvArjf2wvUMJlqfD8jyDBYIhDCfL1MTK9KW4Er+moSuxHR5Pb0ZXaKa4/HKlk0aJ1jB2C+jg7zTSuPRNuS16BpVHaJYsQurCwZwElXMum+GxeXK/h3wXWq5HwebjqZr0aLUMZKRcweDPRoVFiRE=</D></RSAKeyValue>");
    $key =new Crypt_RSA_Key(base64_decode($public_key_string->Modulus),base64_decode($public_key_string->Exponent),"public");
    echo "<pre>";
    print_r($key);
    echo "</pre>";
    $rsa_obj = new Crypt_RSA();
    //try encrypt data
    echo "encrypted result is:<br/>".$rsa_obj->encrypt("this is a smple text.",$key)
    ?>
but the encrypted data cann't decrypt by c#?where is the problem?what should i do with php codes?

thank you for your reply, i also found this article by google.but this does not meet scene,  thank you all the same.
i have already solved the problem now,i'd like to post the Solution .infact it's so easy to use rsakey file generated by .net .
-------------rsa.class.php-------------------
Code Snippet
<?php
 * Some constants
define("BCCOMP_LARGER", 1);
class RSA
  * PHP implementation of the RSA algorithm
  * (C) Copyright 2004 Edsko de Vries, Ireland
  * Licensed under the GNU Public License (GPL)
  * This implementation has been verified against [3]
  * (tested Java/PHP interoperability).
  * References:
  * [1] "Applied Cryptography", Bruce Schneier, John Wiley & Sons, 1996
  * [2] "Prime Number Hide-and-Seek", Brian Raiter, Muppetlabs (online)
  * [3] "The Bouncy Castle Crypto Package", Legion of the Bouncy Castle,
  *      (open source cryptography library for Java, online)
  * [4] "PKCS #1: RSA Encryption Standard", RSA Laboratories Technical Note,
  *      version 1.5, revised November 1, 1993
  * Functions that are meant to be used by the user of this PHP module.
  * Notes:
  * - $key and $modulus should be numbers in (decimal) string format
  * - $message is expected to be binary data
  * - $keylength should be a multiple of 8, and should be in bits
  * - For rsa_encrypt/rsa_sign, the length of $message should not exceed
  *   ($keylength / 8) - 11 (as mandated by [4]).
  * - rsa_encrypt and rsa_sign will automatically add padding to the message.
  *   For rsa_encrypt, this padding will consist of random values; for rsa_sign,
  *   padding will consist of the appropriate number of 0xFF values (see [4])
  * - rsa_decrypt and rsa_verify will automatically remove message padding.
  * - Blocks for decoding (rsa_decrypt, rsa_verify) should be exactly
  *   ($keylength / 8) bytes long.
  * - rsa_encrypt and rsa_verify expect a public key; rsa_decrypt and rsa_sign
  *   expect a private key.
  * rsa encrypt data
  * @param binary string $message
  * @param unknown_type $public_key
  * @param numbers $modulus
  * @param numbers $keylength
  * @return binary data
 function rsa_encrypt($message, $public_key, $modulus, $keylength)
  $padded = RSA::add_PKCS1_padding($message, true, $keylength / 8);
  $number = RSA::binary_to_number($padded);
  $encrypted = RSA::pow_mod($number, $public_key, $modulus);
  $result = RSA::number_to_binary($encrypted, $keylength / 8);
  return $result;
 function rsa_decrypt($message, $private_key, $modulus, $keylength)
  $number = RSA::binary_to_number($message);
  $decrypted = RSA::pow_mod($number, $private_key, $modulus);
  $result = RSA::number_to_binary($decrypted, $keylength / 8);
  return RSA::remove_PKCS1_padding($result, $keylength / 8);
 function rsa_sign($message, $private_key, $modulus, $keylength)
  $padded = RSA::add_PKCS1_padding($message, false, $keylength / 8);
  $number = RSA::binary_to_number($padded);
  $signed = RSA::pow_mod($number, $private_key, $modulus);
  $result = RSA::number_to_binary($signed, $keylength / 8);
  return $result;
 function rsa_verify($message, $public_key, $modulus, $keylength)
  return RSA::rsa_decrypt($message, $public_key, $modulus, $keylength);
 function rsa_kyp_verify($message, $public_key, $modulus, $keylength)
  $number = RSA::binary_to_number($message);
  $decrypted = RSA::pow_mod($number, $public_key, $modulus);
  $result = RSA::number_to_binary($decrypted, $keylength / 8);
  return RSA::remove_KYP_padding($result, $keylength / 8);
  * The actual implementation.
  * Requires BCMath support in PHP (compile with --enable-bcmath)
 // Calculate (p ^ q) mod r
 // We need some trickery to [2]:
 //   (a) Avoid calculating (p ^ q) before (p ^ q) mod r, because for typical RSA
 //       applications, (p ^ q) is going to be _WAY_ too large.
 //       (I mean, __WAY__ too large - won't fit in your computer's memory.)
 //   (b) Still be reasonably efficient.
 // We assume p, q and r are all positive, and that r is non-zero.
 // Note that the more simple algorithm of multiplying $p by itself $q times, and
 // applying "mod $r" at every step is also valid, but is O($q), whereas this
 // algorithm is O(log $q). Big difference.
 // As far as I can see, the algorithm I use is optimal; there is no redundancy
 // in the calculation of the partial results.
 function pow_mod($p, $q, $r)
  // Extract powers of 2 from $q
  $factors = array();
  $div = $q;
  $power_of_two = 0;
  while(bccomp($div, "0") == BCCOMP_LARGER)
   $rem = bcmod($div, 2);
   $div = bcdiv($div, 2);
   if($rem) array_push($factors, $power_of_two);
   $power_of_two++;
  // Calculate partial results for each factor, using each partial result as a
  // starting point for the next. This depends of the factors of two being
  // generated in increasing order.
  $partial_results = array();
  $part_res = $p;
  $idx = 0;
  foreach($factors as $factor)
   while($idx < $factor)
    $part_res = bcpow($part_res, "2");
    $part_res = bcmod($part_res, $r);
    $idx++;
   array_push($partial_results, $part_res);
  // Calculate final result
  $result = "1";
  foreach($partial_results as $part_res)
   $result = bcmul($result, $part_res);
   $result = bcmod($result, $r);
  return $result;
 // Function to add padding to a decrypted string
 // We need to know if this is a private or a public key operation [4]
 function add_PKCS1_padding($data, $isPublicKey, $blocksize)
  $pad_length = $blocksize - 3 - strlen($data);
  if($isPublicKey)
   $block_type = "\x02";
   $padding = "";
   for($i = 0; $i < $pad_length; $i++)
    $rnd = mt_rand(1, 255);
    $padding .= chr($rnd);
  else
   $block_type = "\x01";
   $padding = str_repeat("\xFF", $pad_length);
  return "\x00" . $block_type . $padding . "\x00" . $data;
 // Remove padding from a decrypted string
 // See [4] for more details.
 function remove_PKCS1_padding($data, $blocksize)
  assert(strlen($data) == $blocksize);
  $data = substr($data, 1);
  // We cannot deal with block type 0
  if($data{0} == '\0')
  die("Block type 0 not implemented.");
  // Then the block type must be 1 or 2
  assert(($data{0} == "\x01") || ($data{0} == "\x02"));
  // Remove the padding
  $offset = strpos($data, "\0", 1);
  return substr($data, $offset + 1);
 // Remove "kyp" padding
 // (Non standard)
 function remove_KYP_padding($data, $blocksize)
  assert(strlen($data) == $blocksize);
  $offset = strpos($data, "\0");
  return substr($data, 0, $offset);
 // Convert binary data to a decimal number
 function binary_to_number($data)
  $base = "256";
  $radix = "1";
  $result = "0";
  for($i = strlen($data) - 1; $i >= 0; $i--)
   $digit = ord($data{$i});
   $part_res = bcmul($digit, $radix);
   $result = bcadd($result, $part_res);
   $radix = bcmul($radix, $base);
  return $result;
 // Convert a number back into binary form
 function number_to_binary($number, $blocksize)
  $base = "256";
  $result = "";
  $div = $number;
  while($div > 0)
   $mod = bcmod($div, $base);
   $div = bcdiv($div, $base);
   $result = chr($mod) . $result;
  return str_pad($result, $blocksize, "\x00", STR_PAD_LEFT);
?>
-------------RSAProcessor.class.php------------------------
Code Snippet
<?php
require_once("rsa.class.php");
class RSAProcessor
 private $public_key = null;
 private $private_key = null;
 private $modulus = null;
 private $key_length = "1024";
 public function __construct($xmlRsakey=null,$type=null)
         $xmlObj = null;
   if($xmlRsakey==null)
           $xmlObj = simplexml_load_file("xmlfile/RSAKey.xml");
          elseif($type==RSAKeyType::XMLFile)
           $xmlObj = simplexml_load_file($xmlRsakey);
          else
           $xmlObj = simplexml_load_string($xmlRsakey);
         $this->modulus = RSA::binary_to_number(base64_decode($xmlObj->Modulus));
   $this->public_key = RSA::binary_to_number(base64_decode($xmlObj->Exponent));
   $this->key_length = strlen(base64_decode($xmlObj->Modulus))*8;
  * get public key
  * @return string public key
 public function getPublicKey()
  //return base64_encode(RSA::number_to_binary($this->public_key,($this->key_length)/8));
  return $this->public_key;
 public function getPrivateKey()
  //return base64_encode(RSA::number_to_binary($this->private_key,($this->key_length)/8));
  return $this->private_key;
 public function getKeyLength()
  return $this->key_length;
 public function getModulus()
  return $this->modulus;
  * encrypt data
  * @param string $data
  * @return base64 encoded  binary string
 public function encrypt($data)
  return base64_encode(RSA::rsa_encrypt($data,$this->public_key,$this->modulus,$this->key_length));
 public function dencrypt($data)
  return RSA::rsa_decrypt($data,$this->private_key,$this->modulus,$this->key_length);
 public function sign($data)
  return RSA::rsa_sign($data,$this->private_key,$this->modulus,$this->key_length);
 public function verify($data)
  return RSA::rsa_verify($data,$this->public_key,$this->modulus,$this->key_length);
class RSAKeyType
 const XMLFile = 0;
 const XMLString = 1;
?>
-------------- encrypt data with public key-----------------
Code Snippet
<?php
require_once("RSAProcessor.class.php");
$processor = new RSAProcessor
("<RSAKeyValue><Modulus>m6ljoeWhmnd0oRnsVEH5iNw3B8+vKVu7v7CVfMyf6bnKEzHa62TRmT/baJiSevoI/vgm2ph/s1JrQQTaGiErHicigwSC
Aw7+i05WFbnz7tOyiiJJVMfsdd+v7Xan9Hiud05FzxoMbM8vpiMHPEIDbGJ1MiXyupTVkz2WcMHyBoJ4S189opktZ43pviUhy0PeuWkyoU7zR54akPmK
Yg+z5Zr1r7K8lUZ1a3TThfJGxTQR/uZMtZz/q8QF0AANVQ/eyahTv9icBzBoDuncS0Y5l3vqogW1C/ltJvhJpvSn/OgjbRjuixCAptOUmRd13sDWU95/
x0bMq+Lg68lj2OjJ1Q==</Modulus><Exponent>AQAB</Exponent><P>zfvdBsMLlmo+4PAUYLgSV2xyyVa7ZqFjkJaAE4EbYuH24EoZjrzeiJR++D
FUT/GUhjfZ5eZ/5e29dXwk0sKUw6nHzBdBtOPp5fr4t5SKLEcWY+J+zLUSOlhG9NUkohFf6+Miy2Y7BLpXVrcl6UwXV0ak8KkTPB2l/aIMwYj5dgc=</
P><Q>wXV0sA3nDzoSDQA/4QSu/WIlBhkA3jZ7K7G9Z9rpP1A0vH+bZeyCIyo52u8ahGuYbubaizF1XMp+Xv3Mh2KmRbt7+UptwEwbFAUiiad2a312mqm
j7IJd7gRjGkyzKEm+6fpNeY3NFLNVNhccBqzhNkRoM22xnvQcImD10XVAakM=</Q><DP>wd1HdCLEWCfc0DYE59a2pINUMXyo2foRTDbpifHcRZ+ojAY
Rsc6+nsssCQnccXVMNVqBgSgEvfGYe+eAfMBX5SN5APPuioJrVGF2DsoFlZC+WPoGH0JYSoNlHO8yEDrMDaXzzH2GFHgQ1XOAged0nFbHzB1FFjJNVL5
cxRXWu6c=</DP><DQ>QDKuCk5SwubOXqoaiJ15RHRxPNjHRPZnYVSWOgSXKn9/QJ5H/0bA2NKGaHS4JAFgkEzjcRV0kNpRnUwztymxa6qPtWZRjWK0Ca
y6jVuZHIqB9UkeMLoCWZ3zFSMmwNPYGuUJGLFJwPjR6iU5E64C/nMs8QQR0WHIhFAQwvVZ7uk=</DQ><InverseQ>JckMSlJR10VZdnp83VPjrZ/Z+63
CGu3tWHm7f4DJ8IwjJWr8FlCpbSwiP6a4e9Upv6bUn/tOj2gY6MMq5G5yTKm2SCRvpUKRu4NCmWAt7vlFv0Z6pkXlTOpzvVjv3v16+dIZOA5Zn+v7+r1
xbdYdH20KRAbiBO3MfQP7s+VJJvM=</InverseQ><D>W1xrBr2hQOj1wgxWAgoK7IHbprEFrK+TnWmGA46SGPsbmHJ9fAVbY6fwHg7Wgmk4WHXLUCeLY
/Nu0eWIISfwh60Oe3ls2WC2k4qxyeSvQDBuLNb81U7WAUT9m9E1uK4QMCP3oxs1ybM80zTh7UMNgVK0WG+fbFUomVffcWTTqW+Fu12PEIO+UR/85oq+x
qVlTzYAEzt1OE9IhkYiRzi99ePXeH2gFltzJ/fb/7jLsDTkhM2eiYTGyOTZmBnen6c6a8b9LFTY4Bc0bGpk5ezHkub6F8p2ZgL/JgIOJMyRZICjDjs+9
k9PTmMTFsCF6xzHY15Fg25xIDYzIyx1rrRUjQ==</D></RSAKeyValue>",RSAKeyType::XMLString);
$rs =  $processor->encrypt("Hello,It's Works.");
echo $rs;
?>
with the front codes.you can easy to encrypt data by public key generate by .net programe.

Similar Messages

  • How can I use the templates I generated in CS5 Bridge, in Lightroom 4.4?

    How can I use the templates I generated in CS5 Bridge, in Lightroom 4.4 ?
    It appears that I can not link the templates which I have been using in Bridge for some time to Lightroom 4.4.
    Is this done on purpose?
    Thanks in advance
    Doppy

    I assume these are metadata templates?
    in Bridge, apply a template to an image which has no other metadata (eg a dummy image ) and then import the image into Lightroom, ensuring no metadata applied in the Import dialog. Now in Lightroom's Metadata panel, save the metadata as a new Metadata Preset.
    Repeat for each template.

  • How can I use the work/result generated by quartusii in labview 8.0

    hi ,
    I customized a developing board in quartus ii on the basis of nios ii ,and there are  many customed i/o devices in it, then I want to ask how can I use the work/result  generated by quartusii  in labview? I am new in labview. and I can't find any relationship between quartus ii and libview 8.0.
    tks!

    http://forums.ni.com/ni/board/message?board.id=170&message.id=264457#M264457

  • How can i use the ACL file to control the access from the other website?

    Hello all~
    My Sun one is 6.1 sp3 on Windows 2003 SE, and I am try to use the ACL file to control the access.
    My ACL file is below:
    version 3.0;
    acl "path=my_path_on_HD";
    deny absolute (all)
    (user = "anyone") and
    (dns = "*.my_site.com");
    deny absolute (all)
    (user = "anyone") and
    (dns = "*.other_site.net");
    Once I add the "deny", anyone include my site is decline for vist the path specify in the ACL file. But if remove the "deny", everyone include other one's website can access the file.
    Can anybody tell me how to make it work?

    I think you've misunderstood what the dns attribute is for. The dns attribute returns the hostname of the client accessing your website, not the hostname of the website that linked to your website.
    For example, when someone using the Comcast ISP goes to a malicious website at example.com that loads images from your website at www.amigoo.net, the dns attribute will be something like "c-1-2-3-4.ca.comcast.net", not "example.com". ACLs are used for authentication and authorization of clients (not the websites those clients chose to visit), and they don't provide the functionality you're looking for.
    If I understand correctly, you want to prevent websites other than amigoo.net from linking to files in your d:/webserver/imat/pics_upload directory. You can achieve this adding the following lines to your obj.conf configuration file:
    <Object ppath="d:/webserver/imat/pics_upload/*">
    <Client referer="*~*amigoo.net">
    PathCheck fn="deny-existence"
    </Client>
    </Object>

  • How can I use the "open file" alarm on an iPhone?

    In the iCal program on a Mac, I can set an alarm to open a webpage at a specified time each morning automatically by using the "open file" feature in iCal and using a .webloc file for the URL.  However, the event, when synced through iCloud, does not open the webpage on my iPhone.  Is there a way for me to use the "open file" feature on my iPhone?
    If not by using the "open file" feature, is there a way (through an app or other setting) for me to open a website or a program at a specified time each morning?  Thanks!

    timl006 wrote:
    Hi all,
    I have an iPhone 4, running the latest IOS 4.x revision.  Like many of you, I have installed 3rd party apps to replace the existing default apps from Apple in order to get improved functionality.  Chief among them is the calendar app "Week Cal".  I had already switched to my various Google calendars for my appointments exclusively.  I then made my principal Google calendar my default calendar on both my iPhone and iCal on my Mac.
    The problem is that even though I deleted all local calendars on my mac and told the default iPhone Calendar app to hide all calendars, occasionally it somehow "finds" my Google calendar. Once found, the Calendar app is the one that pops up upon calendar alerts and not Week Cal.  The switch does not seem to be linked to syncing.
    Question #1:  How can I tell my iPhone what my default apps are?  Do I need to do something on my Mac as well?
    I'm guessing that Week Cal has some sort of setting that you use to point it to your calendar, yes?
    If so:
    #1 make sure that Sync iCal Calendars is unchecked in iTunes.
    #2 on your iPhone... Settings > Mail, Contacts, Calendars > turn OFF Calendars for all accounts.
    Now the iOS should no be looking to make contact with any data for Calendar.

  • How can I open the .sif file generated by andor solis

    Hi guys, I am working with an imaging measurement using Andor's EMCCD. It is generating files in the format of .sif.
    I am making a labview based analysis software but labview doesnt open .sif file direcly. I am wondering how I can open this crazy .sif file using labview direcly?
    It is basically a stack of multiple images files with some head files.
    Thanks

    Hi Shuohuang,
    You normally open image files in LabVIEW in a way similar to this:
    http://digital.ni.com/public.nsf/allkb/02971A30F5D​8FC6986256A0A004F11A0
    Or you can import them if they are one of these file types
    http://digital.ni.com/public.nsf/websearch/DD7B273​4795BDAF386256BE40067B6A0?OpenDocument:
    I've never dealt with .sif files before and you say that it is a stack of multiple images so I'm not sure how the normal image functions will work with .sif files.
    If you can post one of the files on here then I can have a play and see if I can figure out how we open them in LabVIEW.
    James W
    Controls Systems Engineer
    STFC

  • How can I use the Concentric Shape Generator in Motion to create a graphic?

    Hi,
    "Concentric Shapes generator
    The Concentric Shapes generator is used to generate patterns derived from circles or from polygons ranging from 3 to 100 sides. Choose two fixed colors or set up a flexible multicolor gradient."
    (taken from http://www.apple.com/finalcutstudio/whats-new.html)
    I would really like to utilise this feature to create some graphics I need to create but I cannot find how to do this. Can anyone point me in the right direction? A tutorial perhaps...? I have looked and looked.
    I basically wish to have a triangle shape increasing in size over and over again in two-tone colour.
    Many thanks,
    Philip
    Message was edited by: Host (to clarify subject?

    Not entirely sure what look you're going for, but here's an example:
    (clicking on the image will download the project).
    Is that what you're looking for?
    Patrick

  • How can I retrieve the password hint of an external drive encrypted with FileVault 2?

    Hi,
    I'm running on 10.7.3, I have an external HDD that is fully encrypted with FileVault 2.  When encrypting an external drive, FileVault 2 doesn't provide a recovery key, but it gives you the opportunity to give a hint at the time you enter the password.  My question is: how can I get this hint?
    I'm asking because I can't mount the drive anymore.  I keep getting prompted to enter the password, and although I believe I'm sure what the password is, it keeps getting refused.  The weird thing is that I have never been asked this password because the drive has always been automatically mounted after reboots, I guess because the password was in my Keychain.  I have no idea why it no longer auto-mounts and none of the passwords I tried worked.
    In Disk Utility, when I tried to "verify" the locked volume, Disk Utility logs an error in system.log with no other user visible action.  I filed a bug with Apple about this (#11286871) but I'm still waiting to hear back from them.  The error logged is:
    Apr 20 22:53:17 nowwhat Disk Utility[1508]: -[__NSCFDictionary setObject:forKey:]: attempt to insert nil value (key: diskIdentifier)
    Apr 20 22:53:17 nowwhat Disk Utility[1508]: (
                        0   CoreFoundation                      0x00007fff915bffc6 __exceptionPreprocess + 198
                        1   libobjc.A.dylib                     0x00007fff87a37d5e objc_exception_throw + 43
                        2   CoreFoundation                      0x00007fff915bfdfa +[NSException raise:format:arguments:] + 106
                        3   CoreFoundation                      0x00007fff915bfd84 +[NSException raise:format:] + 116
                        4   CoreFoundation                      0x00007fff9157cf3b -[__NSCFDictionary setObject:forKey:] + 219
                        5   DFA                                 0x000000010a1aa1b8 DFA + 25016
                        6   DFA                                 0x000000010a1ad701 DFA + 38657
                        7   DFA                                 0x000000010a1a61de DFA + 8670
                        8   CoreFoundation                      0x00007fff915af75d -[NSObject performSelector:withObject:] + 61
                        9   AppKit                              0x00007fff8e507cb2 -[NSApplication sendAction:to:from:] + 139
                        10  AppKit                              0x00007fff8e507be6 -[NSControl sendAction:to:] + 88
                        11  AppKit                              0x00007fff8e507b11 -[NSCell _sendActionFrom:] + 137
                        12  AppKit                              0x00007fff8e506fd4 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 2014
                        13  AppKit                              0x00007fff8e586d04 -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 489
                        14  AppKit                              0x00007fff8e505bde -[NSControl mouseDown:] + 786
                        15  AppKit                              0x00007fff8e4d06e0 -[NSWindow sendEvent:] + 6306
                        16  AppKit                              0x00007fff8e46916d -[NSApplication sendEvent:] + 5593
                        17  AppKit                              0x00007fff8e3ff1f2 -[NSApplication run] + 555
                        18  AppKit                              0x00007fff8e67db88 NSApplicationMain + 867
                        19  Disk Utility                        0x0000000104c4e475 Disk Utility + 9333
                        20  Disk Utility                        0x0000000104c4e270 Disk Utility + 8816

    Even if you succeed with the difficult instructions to do this, if you are running Mavericks (10.9.x) on your Mac, count on it to start over with a whole new backup of your Mac, so you will have two separate backup files for the Mac on the Time Capsule.
    Realistically, few of us ever need to go back months or years to retrieve a file from Time Machine. My recommendation would be to keep the external hard drive around for a few months until you have a good backup history established for the Mac....and then delete the backups from the drive and use it as a spare hard drive.

  • How can I use the color adjustments interface that shows up for camera RAW on jpeg files?

    How can I use the color adjustments interface that shows up for camera raw on other files types? The HLS controls had the secondary color adjustments (6 colors instead of the 3). Plus, it had same vibrancy and a better Curves interface. Yesterday was the first time I imported raw into Photoshop CS5 and I got that really cool interface. What is that? Can I use that on other file formats?

    Actually I am using the Tradional Chinese Version, when I try to edit the jpg file with camera raw, the system shows that there is no camera raw plug-in. The cmaera raw never work.

  • To test how can we use the opt  'logical file name' to name the file based

    Hi Sir/Madam,
               to test how can we use the opt  'logical file name' to name the file based on the selection made in the dtp run for extracting data as flat file.

    Hi Vishali,
    In the DTP select the file location as application server and give the logical file path. The actual file and logical path can be created using transaction "FILE" and "AL11".
    Rest of the process is same as that of extraction from local file.
    Regards,
    Durgesh.

  • How can i do the upload file function using tomcat library??

    how can i do the upload file function using tomcat library??

    Did you read the document for the library?
    If you can't figure it out, why don't you ask the people who provide the library?
    This has nothing to do with JavaMail.

  • How can I use the "Correct camera distortion" filter and process multiple files in PSE 11?

    How can I use the "Correct camera distortion" filter and process multiple files in PSE 11?

    Did you check the help page for Correct Camera Distortion and Process multiple file
    Correct Camera Distortion: http://helpx.adobe.com/photoshop-elements/using/retouching-correcting.html#main-pars_headi ng_5
    Process multiple files: http://help.adobe.com/en_US/photoshopelements/using/WS287f927bd30d4b1f89cffc612e28adab65-7 fff.html#WS287f927bd30d4b1f89cffc612e28adab65-7ff6

  • I have my mac pro with the keyboard in spanish and i didn't knew that it was going to be a big problem because i can't use the key pads the way they are printed, how can i use them the way they r printed?

    i have my mac pro with the keyboard in spanish and i didn't knew that it was going to be a big problem because i can't use the key pads the way they are printed, how can i use them the way they are printed?

    why can't you use the keyboard the way it is printed?

  • Can i use the key figure total delivery time in days in rows and how is can

    Dear all,
              Can i use the key figure total delivery time in days in rows and how is can.but all the key figures r used in rows but i cannot use in column.i want bothin rows and in column  at a time ,can this is possible,and how.

    Hi,
      yes you can.You will have to use structure in the row.
    Right click on the row and create a new structure.
    In this structure you can add key figure.
    Maximum number of structure a query can have is two
    Please assign points if it helped you.
    Regards,
    Senoy

  • How can i use the project code instead of project xml?

    hello
    i use the sessionbean+toplink structure,after i finish the o-r mapping by using the mapping work bench,i generate the project xml file,then in the "session.xml" file,i refer to the project xml,then i can use it from sessionbean.
    i hear that if i use the project code instead of project xml file,it will be more performant,is that true?
    otherwise,how can i use the project code instead of project xml file?i mean, in "session.xml", i can use the "<project-xml>" tag to refer to the project xml file,then in my session bean,i get the server session by read the "session.xml" file.but if i use the project code,how can i refer it from the "session.xml"?the examples that come with the toplink installation only tell me how can i use the project xml file within the session bean,it don't give me any clue about using the project code in the sesion bean,who can give me a step-by-step instruction and code snippet?
    thank you very much?

    There is a slight performance gain during session load at startup but there is no difference at runtime. The choice of which to use is dependent upon you build process. Whether it is easier to submit a new version of the class into the comile build process vs an XML file. In most cases it is just a preference of the development team.
    When you use the project-class you'll need to generate the source code and compile it into your system. Typically it is packaged with the persistent classes. You may need to configure your environment so that the class-loaders have access to these classes (same for the XML case).
    When using the project-class you simply replace the project-xml entry like this:
    <project-class>oracle.toplink.demos.employee.relational.EmployeeProject</project-class>
    The DTD for the session.xml file is found at <TOPLINK_HOME>\core\sessions_4_5.dtd. It is also in the documentation at:
    http://otn.oracle.com/docs/products/ias/doc_library/90200doc_otn/toplink.903/b10064/a-sessio.htm#634246
    Doug Clarke
    Product Manager
    Oracle9iAS TopLink

Maybe you are looking for

  • Engineer to Logical Model ODDM3

    I believe there is a bug in Engineer to Logical Model process. The first time you run that process it works perfect. If there are changes in the Relational model and then you try to use Engineer process again just Entities are added and the relations

  • ANE for iOS 7.1.2?

    I use Adobe Product Store from Adobe Gaming SDK and Milkman Game IAP ver 1.0.9 and both got reject from Apple say that it doesn't ask user information to buy IAP. Please help.

  • Hi everyone i have lost my contact names but not my numbers could anybody help Please ????????

    hi everyone lost names but still have numbers please can anybody help ????????????

  • My weblogic is downed!

    Hi, I deployed my Application in weblogic server and was safe before, because its users increased server crashed now and only below exceptions was logged. {javax.xml.ws.WebServiceException: com.ctc.wstx.exc.WstxIOException: socket write error: Connec

  • User administration PL/SQL codes

    Can any body fordard me the PL/SQL conding used to all the aspects of User administration like user creation, privilages, roles etc. Secondly , can you please advice me if i need sample code for DBA purpose , where i should look. Thanks Arif