How can i change the colour of the keys on my mac? is it possible to get them changed?

i was looking at a macbook i was today and it's keys on the keyboard were in a rainbow formation, with different colours. Is there a way to bring mine in to change the colours of the keys? or did i have to order it like that?

Ask the person who owned the computer or do a Google & Bing search. 

Similar Messages

  • How can I delete the files .DS_store in Mac OS Yosemite?

    How can I delete the files .DS_store in Mac OS Yosemite?

    The .DS_Store file is normal. It holds certain settings related to the folder it is found in. Removing these files is futile, as they will come back, as you have observed.
    If you are seeing them on your Mac, that means you have changed settings so that your Mac is showing invisible files in the Finder. To reverse that, run the following command in the Terminal:
    defaults write com.apple.finder AppleShowAllFiles NO
    This will hide them, and any other invisible files, from view.
    If you are seeing them on a Windows machine, just ignore them. They're not doing any harm.
    If you found a Terminal command that is supposed to stop them from being created, I would be extremely skeptical as to the wisdom of running it.

  • How can we remove the key from the dataset which has json

    uid
    id
    Json
    4588
    51
    { "key": "1/0/234", "element1":{ "a":10 "b": "test1" } }
    4589
    52
    { "key": "1/0/234", "element1":{ "a":10 "b": "test1" } }
    4590
    53
    { "key": "1/0/234", "element1":{ "a":10 "b": "test1" } }
    I have the above dataset resulting from merge operation .
    UID -Integer data type
    ID- Integer data type
    Json- String data type holding json document
    How can I remove  the " key" element from the json field  and make my dataset look like 
    Expected output which will strip of key value pair from the json column
    uid
    id
    Json
    4588
    51
    { "element1":{ "a":10 "b": "test1" } }
    4589
    52
    { "element1":{ "a":10 "b": "test1" } }
    4590
    53
    { "element1":{ "a":10 "b": "test1" } }
    Mudassar

    Hello Mudassar,
    In SQL Server / T-SQL we don't have a native JSON support, so you would have to implement a solution on your own = parsing the string and remove the "Key" + it's value.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • I've updated to the most recent version of iTunes and I can no longer see any of my old music on my mac.  All the music is still available on my ipad.  How can i download the music on my mac?

    I've updated to the most recent version of iTunes and I can no longer see any of my old music on my mac.  All the music is still available on my ipad.  How can i download the music on my mac?

    First, are you positive it is really not there?  Have you looked in your iTunes folder in your Music folder, and in the media folders there? Do you see your media files?
    If your media are gone it is a lot easier to restore from a proper computer backup.  Your i-device was not designed for unique storage of your media. It is not a backup device and media transfer was planned with you maintaining a master copy of your media on a computer which is itself properly backed up against loss. Syncing is one way, computer to device, updating the device content to the content on the computer, not updating or restoring content on a computer. The exception is iTunes Store purchases which can be transferred to a computer.
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer - http://support.apple.com/kb/HT1848 - only purchases from iTunes Store
    For transferring other items from an i-device to a computer you will have to use third party commercial software.  See this document by turingtest2: Recovering your iTunes library from your iPod or iOS device - https://discussions.apple.com/docs/DOC-3991

  • How can I add the key listener to JFrame

    Hi,
    How can I add the Key Listener to the JFrame? I want to show the Windows default popup which comes after right clicking on the frame's header. I want to add the key board support for the same

    1. Make sure that key events are enabled on your component. (AWTMulticaster.enableEvents(...)
    2. add the keylistener

  • How can I drop the key board from my calendar. The normal lower right key stopped working

    How can I drop the key board from my calendar? The normal lower right key stopped working.

    You can install this extension to make it easier to edit userChrome.css:
    * ChromEdit Plus: http://webdesigns.ms11.net/chromeditp.html
    The file needs to have this code:
    <pre><nowiki>@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    #personal-bookmarks #bookmarks-menu-button { display:none !important; }</nowiki></pre>
    You can reach the profile folder this way:
    *Help > Troubleshooting Information > Profile Directory: Open Containing Folder
    The file userChrome.css needs to be in the chrome folder in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder], so if the chrome folder is missing then you need to create a folder with the name chrome.

  • I purchased the yearly Photoshop plan. How can I install the photoshop in my mac?

    I purchased the yearly Photoshop plan. How can I install the photoshop in my mac?

    Install the Creative Cloud app and sign in.
    Mylenium

  • How can we delete the request after compression? is it possible ?if so how?

    how can we delete the request after compression? is it possible ?if so how?

    Hi,
    You basically have 3 options:
    1. Use selective deletion and delete the error records.
    2. Do reverse posting and negate the error records.
    3. This is my preference. Delete all the data from the cube. RSA1 -> cube -> right click -> delete data -> choose "fact and dim" from pop-up. Now reconstruct all the requests that you need i.e ignore the error request. But before all this make sure you have the PSAs for all the request.
    Bye
    Dinesh

  • I have bought key note for my iPad 2 can I used the same in my mac or I need to buy them for the mac

    I have bought key note for my iPad 2 can I used the same in my mac or I need to buy them for the mac

    Sorry, no. Different Apps for different operating systems.
    Stedman

  • How can I control the zoom on my mac mouse?

    How can I control the zoom function on my mouse? In the middle of working on things my hand will rub the mouse by accident and all of a sudden the context within the screen is large. I have no idea of how to work this feature on my mouse and most times to get it to return to normal, I have to escape out of the work I am performing.

    If you are pressing the "Control" button on the Mac keyboard, scrolling up will zoom in and scrolling down will zoom out. You can disable this if it annoys you through System Preferences > Universal Access. If you are using Mountain Lion, it would be System Preferences > Accessibility.
    Uncheck the in the "Seeing" or "Zoom" section that says "Use scroll gesture with modifier keys to zoom".  It may be slightly different if you have an older OS X version. I have Mountain Lion and am going off of memory on the older versions.

  • How can i improve the speed of my mac?

    my mac has 667 MHz, how can i improve the speed?

    Sorry if that sounded not very helpful, but basically it comes down to that. Not much can improve the performance of machine of that vintage, to stand up to a current model, unless you spend almost as much on upgrades (some of which to consider are listed below).
    Some thought should be given to the budget (money and time and effort) one is willing to spend. The G4 Digital Audio is possibly a good candidate for upgrading for someone who is interested in do-it-yourself computer stuff and bargain hunting for parts. It can even be a fun hobby. But even max-ing out all possible upgrades will still be lacking in performance compared to the current Mac models, I don't actually have any specific benchmarks, just my gut feel. And you may spend a good portion of the cost of a new machine on all those parts for the old machine.
    Is this the 667MHz machine (G4 Digital Audio) in question?
    http://www.lowendmac.com/ppc/digital-audio-power-mac-g4.html
    http://eshop.macsales.com/Descriptions/specs/Framework.cfm?page=g4da.html&title= Power%20Macintosh%20G4%20Digital%20Audio
    or is it some other model?
    Here are some CPU upgrades, for example:
    http://eshop.macsales.com/MyOWC/Upgrades.cfm?sort=pop&model=162&type=Processor&T I=2420&shoupgrds=Show+Upgrades
    you can even get a small rebate for your original CPU
    http://eshop.macsales.com/Service/rebate-program/
    Any of those CPUs should double your processing speed, but you may also need more RAM...or the CPU will just be waiting for data to be read from the virtual memory on the hard drive.
    http://eshop.macsales.com/item/Other%20World%20Computing/133SD512328/
    you could max it out with a whopping 1.5 GB, with 3 of these.
    and you may need a better video card...
    http://eshop.macsales.com/MyOWC/Upgrades.cfm?sort=pop&model=162&type=Video&TI=29 34&shoupgrds=Show+Upgrades
    To add larger and faster hard drives than the original Ultra ATA/66 can handle you would need a PCI ATA133 or PCI SATA card...
    http://eshop.macsales.com/item/ACARD/AEC6280MOB/
    http://eshop.macsales.com/item/Sonnet%20Technology/TSATA/
    And if you need to install OS X from a DVD, and want to burn your own DVD, you may need a new optical drive, if one hasn't been installed already, to replace the CD-RW:
    http://eshop.macsales.com/MyOWC/Upgrades.cfm?Model=162&Type=InternalOpticalDrives&sort=pop
    Also, check out the Power Macintosh G4 forums if you have any questions about that particular model, (if I guessed correctly)
    http://discussions.apple.com/category.jspa?categoryID=113
    Even while I am trying to build a case to convince someone not to waste their money on this project, I am thinking to myself, where can I pick up one of these G4 towers to take on this project myself. Maybe a Quicksilver, no a FW400 MDD dual-boot for sure, I still have some OS 9 software. I did about all I can with my G3 Desktop, and spent more than my MacBook cost.

  • How can we scan the Key Strings of any UI

    please tell me the way so that i can scan all the key strings of any UI.

    Are u trying to write a Spy program. :)

  • Entourage Email - I have taken over someone else job so have her email account with all folders and past emails and have also added my own email account. How can I sync the folders- as I need to be able to see them on my iphone but its under her 'account'

    I have taken over someone else job so have two email accounts on my Entourage - as the past account had all the folders and past emails when I sync my mail onto my iphone I can not see the folders and any past emails. How can I sync all of her old mail account info (emails and folders) to my email account to make ONE email account?!

    Marc Bublitz wrote:
    I thought that originally too, but that's all changed with the pool of apps that are out there now. So now what I'm trying to do is to prove that technology is progressing to the point where a tiny, handheld phone can produce images that are nearly as good as photos taken with much more expensive and bulky equipment. I've got my share of expensive bulky camera equipment, but I'm finding that I'm having much more enjoyment out of using my iPhone from initial capture, to editing, to publishing, and achieving results that are nearly as good.
    I do think you're working under a bit of a handicap. For example, lens quality. Here's an iPhone photo example of some wild turkeys in the neighborhood masked by flare that would be much better controlled on an SLR lens (click to enlarge - the flare is obvious, the turkeys are not):
    At the same time, working under a handicap can definitely spur creativity, similar to the oft-cited example of swapping out your zoom lens for a prime to force yourself to pay attention to composition.
    It's an interesting concept - I wish you luck!

  • How can we trape the Keys Pressed on the Keyboard and do action depending on the keys

    I want to know how we can capture the keys pressed on the keyboard by the user and do necessary action depending on the key pressed by the user....
    For example.... If user press Alt+q the form should go in the Enter Query Mode.
    Can anyone tell me how i can do this in Form 6i....
    Please Help me out from this problem...
    Thanks in Advance
    Shan

    Can somebody point me to what I need to use to
    intercept all the 'keys' for an application.
    At the moment I have set Focus to parts of the
    application when the Mouse is over it, and then get
    the Keys with a KeyListener.
    Is there a way to get the keys, as long as the Java
    app is active.
    - Its an image display program, and I want to use keys
    for - next image , zooom etc etc.
    If soemone could just point me to the right part of
    the API to look in?java.awt.Toolkit.addAWTEventListener()
    then use the mask defined in AWTEvent.KEY_EVENT_MASK to listen to all the events.
    Steve

  • In phone contact I don't get a keypad when trying to search, edit or add contacts how can I make the key pad appear?

    Since updating with 7.1 I no longer get a keypad appearing when I try to search, edit or add contacts in the phone - how can I get the keypad to appear?

    Hello there, English Springer Spaniel.
    The following Knowledge Base article offers some great steps for troubleshooting an app that isn't performing as expected:
    iOS: Understanding multitasking
    http://support.apple.com/kb/ht4211
    If an app doesn't respond to your input, or doesn't perform as expected, do the following, testing after each step:
    Check for app updates.
    Force the app to close.
    Restart your device.
    Update your iOS device.
    Learn more about troubleshooting apps.
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • 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.

Maybe you are looking for

  • Error in StringTokenizer

    I am trying to run this code that I got from a textbook. The only thing that I changed was the name of the file that was to be read in. It was "inventory.dat" and I changed it to "clients.txt". The code compiled fine but when I went to run it I got t

  • DMS server sizing calculation

    HI Gurus, My client has given that Finance department is generating documents around 20 GB  per month (includes all types of format) now i have to create the Server sizing for this 20 GB kindly help on how to proceed. Is there is any standard calcula

  • Organisation Assignment Questions

    Hi ALL, Currently, I am developing an application which allows BP to assign themselves assigned to the position with relationship “Owner” under an organization unit.just like how you work in transaction: PPOSA_CRM When create this relationship, I hav

  • Can you add menus to home movies?

    Hi, Just wondering if iMovie has any way of adding menus to the start of home movies. The sort of menu that you can select chapters from to jump to different sections of the movie.

  • CS3 Color Issue

    I recently started having this issue and have no idea how to reset it or change it. My color scheme or palette or color settings must have changed somehow because everytime I open up a B&W image, Photoshop CS3 actually shows it to me with like a sepi