Assosciation private and public

I would like to have some responses from you guys. From OOAD point of view what are the considerations to be kept in mind before making an assosciation private or public.
Any ideas would be welcome

Containment associations will most often be private.
Consider the following:
Class Node is to be kept in a list which Class A manages.
First example.
Class Node is defined as a private inner class of Class A. Class A keeps a list of Nodes using a private instantiation of the ArrayList class. Node is private. The ArrayList is private. So when diagramming it the association is certainly private.
Node is wholly owned and contained by A. If A is deleted then all Nodes are deleted.
In this case one might make the point that because this is entirely private that it implementation rather than design. So it shouldn't be diagrammed at all. But sometimes it is necessary to do this to show how it will meet the needs of the system (or because a junior programmer is doing the coding and you want it to be painfully obvious.)
Second example
Class Node is a public class (not part of Class A.) Class A keeps a list of Nodes using a private instantiation of the ArrayList class. So when diagramming it the association is certainly private.
Again in this case A owns all of the Nodes.
Again the association could be consider an implementation detail (diagram is not necessary.) But because there are now external users, it might be more relevant to detail explicitly that a list of these is being kept.
For the above two examples 'private' might also serve the need of the code generation capability of the two. Neither of the above associations should ever be implemented publicly.
Third example
A variation of the examples above is where the association is to be managed by one or more external systems. If there is one external system then it can own it. But if there is more than one, then the assocation must be public.
In this case it is certainly possible (and likely) that A does not own the Nodes that it is associated with.
Fourth example
If the relationship between A to Node is many to many than the association is always external to A and Node. So unless it is explicitly owned by a single external system it must be public. Never make the mistake of trying to have either class try to own it.
In this case A never owns the Nodes that it is assocated with.

Similar Messages

  • How to get the private and public key?

    there is my code,i want to get the public key and the private key �Cbut i could not find the the approprite method to solve the problem.
    import java.security.Key;
    import javax.crypto.Cipher;
    import java.security.KeyPairGenerator;
    import java.security.KeyPair;
    import java.security.Security;
    public class PublicExample {
    public static void main(String[] args) throws Exception {
    if (args.length != 1) {
    System.err.println("Usage:java PublicExample <text>");
    System.exit(1);
    byte[] plainText = args[0].getBytes("UTF8");
    System.out.println("\nStart generating RSA key");
    KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
    keyGen.initialize(512);
    KeyPair key = keyGen.generateKeyPair();
    System.out.println("Finish generating RSA key");
    Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
    Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding", "BC");
    //System.out.println("\n" + cipher.getProvider().getInfo());
    System.out.println("\nStart encryption");
    cipher.init(Cipher.ENCRYPT_MODE, key.getPublic());
    byte[] cipherText = cipher.doFinal(plainText);
    System.out.println("Finish encryption:");
    System.out.println(new String(cipherText, "UTF8"));
    System.out.println("\nStart decryption");
    cipher.init(Cipher.DECRYPT_MODE, key.getPrivate());
    /*i want to get the private and public key in this method ,but i found the result was not
    the one i expected to get,how to solve the problem?
    thanks in advance!
    System.out.println("private key:" + key.getPrivate().toString());
    System.out.println("public key:" + key.getPublic().toString());
    byte[] newPlainText = cipher.doFinal(cipherText);
    System.out.println("Finish decryption:");
    System.out.println(new String(newPlainText, "UTF8"));
    thanks in advance!

    System.out.println("private key:" +
    " + key.getPrivate().toString());
    System.out.println("public key:" +
    + key.getPublic().toString());
    key.getPrivate() returns an instance of PrivateKey and key.getPublic() returns an instance of PublicKey. Since PublicKey and PrivateKey are interfaces then they will return one of the concrete implementations. Check out the Javadoc for PublicKey and PrivateKey.
    When you know which concreate implemenation you have then you can use the methods on that object (by appropriate casting) to find the information you want.

  • Is it possible to move content between private and public sites after publishing the latter?

    Hi. Is anyone else in this position? My institution kept its original iTunes U site after migrating our public content to the new public site last year. We now have separate public and private (university log-in only) sites and must maintain both. The Public Site Administrator allowed the copying of existing content from the original iTunes U site to the new public site, but ONLY prior to publication of the public site. I have two related questions for the community:
    1) How is it possible to maintain a workflow in which faculty create a course for the private iTunes U site (wanting to keep the content restricted to our students while the course is live), but then move the content over to the public site once the semester ends?
    2) With the new app for Courses and the Course Manager on the public site, what do we do with the courses already created by faculty as Collections (either in the public or private sites)?
    I hope there are folks out there that can help.
    Thanks!
    Kevin

    I'd like to see a discussion on this exact topic as well. Have you determined yet how to move a private course (apple hosted) to the public site? Can you use an RSS feed from the private?
    joe

  • How to get the private and public keys to use recaptcha?

    I have registered with google to get a recaptcha for my website. All I got was the site key and secret key! Though I need to get the public and private key for muse!

    Hello,
    Please use site Key as "Public Key"and Secret key as "Private Key".
    Regards
    Vivek

  • Is this type of set-up possible - private and public network with Airport

    We have an office network with Airport. We have internet with a cable modem with routers plugged to it. The network is not now shared with anyone outside the business.
    But would it be possible to add a public component to our setup that would give others access to the internet but never, never, never allow them to enter/see/ mess with the private side?
    Tim

    Sorry to intrude, I came across this thread while I was looking for some other information and thought that there needed to be a point of clearification to identify some major security vulnerabilities.
    With the current config, Cable Modem->Wan port of Router A->Router B plugged into LAN port on Router A
    1. Traffic from Router A would see all traffic sent from router B out to the internet, if I was able to sniff the traffic on router A then I would see everything that router B was passing to the internet...not good idea if Router A is public, (traffic would not be encrypted since this is a hard line pass to the cable modem).
    2. Router A will always be able to see the interface of router B (have to have it this way to perform the passing of IP traffic from one router to the other.) This means that router B will be open for brute force login attempts and any other vulnerabilities that the router might carry, again since this is being accessed from a publicly accessible network it would be hard to stop from happening in todays world.
    3. Router B subnet - If you NAT all the IP's behind router A on it's on subnet (which would include Router B). Uunless router B truly has two interfaces (internal and external) you would not be able to use different subnets and expect to pass traffic all the way to the cable modem because it would not know how to get there.
    Again, this post is not meant to cause annomosity, it is to help educate.
    I personally think that the safer bet is to get a second hi-speed connection, physical seperation in this case is the best way to go, saves you the worry of getting attacked or snooped on, and keeps your private information safe from the public...unless that is something that you are willing to risk sharing.

  • Keyword private and public

    can anyone send me a code that can help me distinguish from accessor public and private??

    Double post
    http://forum.java.sun.com/thread.jspa?threadID=640525&tstart=75

  • Private and Public Networks with DHCP, DNS, AD-DS

    Hello, I am a student working on creating a server lab at school and am curious if it is possible to set up a unique testing environment. I will describe what I am trying to achieve below.
    I have roughly 15 servers inside of my school lab and want to learn some solid skills as I go out into the workforce. The server lab will utilize one server specifically as a AD-DS, DHCP, and DNS Server and another as a TFPT / Terminal Services Server. This
    so that I can set up the rest of the servers as a PXE boot environment (This may not be practical in the real world, but want to get some experience with it.) In order to do this I am using a private network that I have created with the networking equipment
    I have (Cisco 1800 Series Router, Cisco 2950 Series Switches) inside of the lab, but need to make sure that the servers in the lab can NOT talk to the rest of the world on the school network that will be plugged into the second NIC. This is so that I can download
    windows updates from the school network and hopefully apply them through Windows PowerShell (Is this possible?) to the servers in the private lab network.
    I am curious if it is possible to set up a AD-DS, DHCP, and DNS server so that it only communicates through one port and not talk to the rest of the world, as well as if it is possible to create a PowerShell script to check for Windows Updates on the school
    network, download them, and then distribute them to the servers inside of the lab environment? 
    Please feel free to ask questions and any help or insight would be appreciated. 

    What you are attempting to do is quite common.  A simple implementation can be done with what can be called a 'jump server'.  That server is the only machine in your environment that has access to the internet.  You must log into it first
    before you have access to your lab environment.  It's basically how I set up my lab.
    The jump server can also host Windows Server Update Services (WSUS).  This is a no-cost capability from Microsoft that can automatically download patches from Microsoft.  I then use a group policy in my lab domain to set the update server of my
    domain to point at the WSUS server.  If fact, this sort of configuration is quite common in corporate environments, too.  It ensures that corporate machines are not going out to the internet to download patches, allowing the corporate managers to
    download and test the patches to see if they break anything before deploying to the rest of the corporate machines as a whole.  So the jump server has one IP address that is routable to the internet and a second network on your lab's domain network. 
    The jump server does NOT run any routing software, so no machine from the lab can access the external network.
    . : | : . : | : . tim

  • Property semantics - private vs public APIs

    Hi,
    Question about property directives and how to enable separate public and private semantics.
    In my class's public interface I would like a property to be read only so I declare it as follows:
    @property (readonly) someproperty;
    However, within the class I would like to set the property and have the convenience of retain being called and set to nil through the property so the release happens. So I would do the following:
    @property (retain) someproperty;
    Now the two semantics are not entirely mutually exclusive. I could do the following:
    @property (readonly , retain) someproperty;
    However, external users of the class can use the setter which is not what is intended. Coming from a Java and C# background it seems that objecive-c does not provide as robust a syntax for making clean distinctions between public and private interfaces.
    What strategies can you suggest to achieve my goals of keeping my private and public semantics and usage clear? Any good web resources on the broader subject of best practices in API design in objective-c?

    Yes class-dump can always be used to generate public interfaces in a hostile world but that's not really the point. The issue is how to generate clean interfaces for a team of software developers. Anyway after talking to Matt, I have answered my own question: a synthetic property, a category plus a hand coded setter will make this work. Once the bug in @synthesize is fixed this will be nice solution to the problem.
    Here are a few bits to illustrate:
    In MyClass.h
    @interface MyClass
    @property (readonly) id someProperty;
    @end
    In MyClass.m
    #import "MyClass.h"
    @interface MyClass (Private)
    @property (retain) id someProperty;
    @end
    @implementation MyClass
    @synthesize someProperty;
    // Bug - hand written setter needed since @synthesize will not generate one for me
    - (void) setSomeProperty: (id)newProperty
    if (newProperty != someProperty)
    [someProperty release];
    someProperty = [newProperty retain];
    @end
    Files that import MyClass.h will only have access to the getter while the setter is available to MyClass.m.

  • Difference between public void, private void and public string

    Hi everyone,
    My 1st question is how do you know when to use public void, private void and public string? I am mightily cofuse with this.
    2ndly, Can anybody explain to me on following code snippet:
    Traceback B0;//the starting point  of Traceback
    // Traceback objects
    abstract class Traceback {
      int i, j;                     // absolute coordinates
    // Traceback2 objects for simple gap costs
    class Traceback2 extends Traceback {
      public Traceback2(int i, int j)
      { this.i = i; this.j = j; }
    }And using the code above is the following allowed:
    B[0] = new Traceback2(i-1, 0);
    Any replies much appreciated. Thank you.

    1)
    public and private are access modifiers,
    void and String return type declarations.
    2)
    It's called "inheritance", and "bad design" as well.
    You should read the tutorials, you know?

  • Want to change Public, private and vip address on RAC 10g R2 windows 2003

    The network section told us the configuration of the network who support our cluster will have to change all ip address.
    We are looking for a complet document who give all the step by step instructions how to make this change.
    We have to change the Public, private and VIP at the same time of our 3 nodes cluster.
    We know the OCRCFG will be impact. So we will take backup of it first.
    Can someone are able to indicate us how to procede to execute this task.
    Thanks

    Hi,
    i check the Note:283684.1 you give me, but it didn't give all the answers to my problem.
    I finally found a recipe to make the job. I would like to tell you it's not supported be Oracle, but it work very well
    Don't forget to take a good backup of the ocrcfg and vote disk before you start.
    Here we go:
    Stop all Oracle service on all nodes before the change of the address, the low format of the ocrcfg and vote disk
    change the address in the file host in C:\WINDOWS\system32\drivers\etc with the new address
    change the ip address in the window network definition connection with the new address
    ocopy \\.\ocrcfg d:\backup\ocrcfg.dmp
    ocopy \\.\votedsk1 d:\backup\votedsk1.dmp
    rem go to directory of the cluster binary crs\bin
    cd /D D:\Oracle\Ora10g\crs/bin
    rem Format raw ocrcfg and vote disk
    LogPartFormat.exe \\.\ocrcfg /q
    LogPartFormat.exe \\.\votedsk1 /q
    rem Run in prompt mode the cluster setup
    rem crssetup.exe config -nn %s_nodenumberlist% -pn %s_privatenamelist% -ch %ORA_CRS_HOME% -oh %s_OracleHome% -c %s_clustername% -l "%s_languageid%" -q %s_votedisklist% -g %s_usergroup%
    rem example for 2 node
    crssetup.exe config -nn host_name_node_1 ,1,host_name_node_2,2 -pn host_name_node_1-priv,1,host_name_node_2-priv,2 -ch D:\Oracle\Ora10g\crs -oh D:\Oracle\Ora10g\crs -c crs_lab -l "CANADIAN FRENCH_CANADA.WE8MSWIN1252"; -q "\\.\votedsk1"
    rem ensures that all nodes are configured with the same port for the ONS
    racgons.exe add_config host_name_node_1:6200 host_name_node_2:6200
    rem oifcfg to direct components to use specific network interfaces
    oifcfg.exe setif -global "Public"/10.200.5.0:public "Prive"/192.169.255.0:cluster_interconnect
    rem to rebuild the vip address vipca in wondow componant and make the incription in the cluster (in prompt mode or online)
    rem at the same time it will create the gsd and ons service
    vipca.bat -silent -nodelist "host_name_node_1,host_name_node_2" -nodevips "host_name_node_1/host_name_node_1-vip/255.255.255.0/Public,host_name_node_2/host_name_node_2-vip/255.255.255.0/Public";
    rem vipca
    rem check the state of the crs services (inscription)
    crs_stat -t
    rem now make the registration of the listener in the cluster.
    rem important don't use the prompt command below, it will give you a crs-0223 error at the startup service
    Rem to solve this problem use netca on line
    rem crs_register ora.host_name_node_1.LISTENER_host_name_node_1.lsnr -dir D:\Oracle\Ora10g\crs\crs\profile
    rem crs_register ora.host_name_node_2.LISTENER_host_name_node_2.lsnr -dir D:\Oracle\Ora10g\crs\crs\profile
    rem srvctl start nodeapps -n host_name_node_1
    ren srvctl start nodeapps -n host_name_node_2
    netca
    rem check the state of the crs services (inscription)
    crs_stat -t
    rem start oracle object service and cluster volume before registering and accessing to asm services
    sc \\host_name_node_1 start ”Oracle Object Service”
    sc \\host_name_node_1 start OracleClusterVolumeService
    sc \\host_name_node_2 start ”Oracle Object Service”
    sc \\host_name_node_2 start OracleClusterVolumeService
    rem go the the rdbms directory to make the registration of asm and the database
    set ORACLE_HOME=D:\Oracle\Ora10g\rdbms
    rem add the service asm in the cluster in my case asm1 and asm2 for my 2 nodes
    srvctl add asm -n host_name_node_1 -i +ASM1 -o %ORACLE_HOME%
    srvctl add asm -n host_name_node_2 -i +ASM2 -o %ORACLE_HOME%
    rem start the asm service on each node
    srvctl start asm -n host_name_node_1
    srvctl start asm -n host_name_node_2
    rem check the state of the crs services (inscription)
    crs_stat -t
    rem go to the bin directory of rdbms directory to make the registration of the database
    cd /D D:\Logiciels\Oracle\Ora10g\rdbms/bin
    rem register the database (in my case labotary lab) and the to database service (lab1 and lab2) of each node
    srvctl add database -d lab -o %ORACLE_HOME%
    srvctl add instance -d lab -i lab1 -n host_name_node_1
    srvctl add instance -d lab -i lab2 -n host_name_node_2
    rem finally start the database
    srvctl start database -d lab
    rem go to directory of the cluster binary crs\bin
    rem all the services
    cd /D D:\Logiciels\Oracle\Ora10g\crs/bin
    rem you can go in the database with sqlplus and check all your components
    crs_stat -t
    I hope this will help someone who are in the same situation
    Edited by: ron_berube on 2008-12-12 09:21
    Edited by: ron_berube on 2008-12-12 10:08
    Edited by: ron_berube on 2008-12-13 08:25
    Edited by: ron_berube on 2008-12-18 10:49

  • What is the difference between private API and public API??

    Hi,
    I came accross the terms private API and Public API ?
    what are these APIs and what is the difference between them??
    Thanks and Regards,
    Soham

    Soham,
    Publicly Callable Business Process APIs are the list of supported and published APIs. Direct calls to any other routines are not supported, unless explicitly specified, because API validation and logic steps will be bypassed. Many other packages include procedures and functions, which may be called from the API code itself.
    Note:216838.1 - Oracle HRMS Product Family Publicly Callable Business Process APIs (A Reference Consolidation)
    Regards,
    Greg

  • Private API and Public API

    What is the difference between private API and public API??

    Hello,
    from a technical point of view, a private API is normally embedded in a public API.
    The NON ORACLE specialist developpers have to use public API as an interface to control ORACLE APPLICATIONS.
    Normally, the functions/procedures of private API must be hidden to the NON ORACLE specialist developper.
    Roméo.

  • Internal and Public DNS conflict breaks mail

    History:
    We set up a new Mac Mini Server to replace our existing Server. The Mac Mini Server is setup behind a Time Capsule, which acts as our router and DHCP server. It also acts as our firewall on the public IP address and forwards mail to our internal server. Our situation is almost identical to the example situation on page 18 to 19 in the 'Getting Started' guide.
    Our ISP acts as our DNS server and they host our public website. They also used to host our mail, but we have now moved the mail to our new in-house server. We asked our ISP to update their MX records to point to our static public IP address. Public DNS records for server.mydomain.com also resolve to this IP address.
    When we originally set up the new mac mini server, the ISP had not yet updated the MX records. I am wondering if this affects how the Server sets up DNS on the local server machine?
    Issue:
    The local server machine on the local LAN is called server.mydomain.com, which resolves via local DNS (hosted by our server) to the server's internal IP address. (The local DNS server was setup automatically by the Server during initial installation / setup.) This conflicts with with public DNS records which identify server.mydomain.com with our public IP address at 205.200.19.225. This somehow causes confusion for the server which consequently seemingly randomly resets our domain (mydomain.com) and host name (server.mydomain.com) settings under Mail settings - which breaks our mail service. (We then edit these to the correct settings and all works again.)
    I spoke to an Apple tech and they advised that we reinstall the Server operating system, using a local server name that differs from the public name. e.g. server.mydomain.lan (local) vs. server.mydomain.com (public).
    *This may seem like a dumb question*: Would it be easier to keep our local host and DNS set up to server.mydomain.com and then rather have our ISP change the records for our public address / IP to mail.mydomain.com or public.mydomain.com? If we could make the change via the ISP's records versus our own, then it would save us a lot of work.
    *A second potentially dumb question:* Since we rely on our ISP for DNS name servers, could we delete / stop the local DNS server for the local network and just use straight IP addresses instead?
    *Plan of Action:*
    Assuming that there is not an easy fix via the ISP's DNS records, then I'll reinstall the operating system and use server.mydomain.lan as the local machine and domain name. If I do this, then what should I be using as the domain and host name settings in mail? .com or .lan?
    Should there be any need to manually configure DNS settings to make Mail work?

    Mr Hoffman and Corbywan - thanks for the interesting and educational discussion. I must admit that I am still a bit confused and would appreciate any further help in understanding this issue!
    *My situation:*
    - Server on a LAN, which sits behind a Time Capsule router.
    - The Time Capsule router serves DHCP and Internet to the LAN and sits on our public static IP Address.
    - Our ISP has set up MX and domain records to forward public requests for our domain to our static IP address.
    - Time Capsule acts as our firewall and forwards Mail and other incoming services to our internal server via port forwarding.
    - Local DNS service is provided by the local server so that it can provide services to the local network. Non local requests are forwarded to the ISP DNS service.
    *The problem*
    We seem to have established that Snow Leopard Server breaks when the internal domain name matches the public domain name, because of conflict between the internal and public DNS which resolve to different IP addresses for the same domain.
    *The solution*
    I am looking for the easiest and most basic way to fix this problem. My understanding is that the simplest would be to reinstall our Snow Leopard Server to a new and different local domain name.
    I am thinking of using server.example.lan for our local LAN domain name - which would be resolved to our private IP address via local DNS on the local server. I would be keeping server.example.com for our public domain name - which would be resolved to our public IP address, which would be forwarded from the Time Capsule to the internal server.
    Now where I start getting confused is this: If Snow Leopard Server requires a Fully Qualified Domain Name to do things like send mail, then do I need to register my internal domain name? And how would this resolve from a public DNS server to the internal private IP address? Or is it more an issue where as long as the internal (albeit 'fake') domain name does not conflict with an existing public domain name?
    *Other items:*
    After setup, I will verify that Snow Leopard Server has setup our local DNS correctly for local DNS service.
    If I understand correctly, I would set up Mail Settings - 'Domain Name' as the local domain name: i.e. example.lan and I would set up the Host Name as server.example.lan - is this correct? Would this work if these are not FQDN?
    How does the mail server reconcile these local domain names with the public domain names? I assume that I need to check the box at Mail - Settings - Advanced - Hosting: "Include server's domain as local host alias" ? Or would I manually add an alias to the Local Host Aliases under the same tab?
    Thanks!

  • Generating RSA keys based on p, q, and public exponent

    Hi,
    The problem is the following. I need to generate an RSA key pair on the card based on pre-defined P, Q and public exponent. The KeyPair specs syas that if the public exponent is pre-initialized it will be retained. All other values are overwritten though (I checked with a test applet on jcop41). So two questions:
    1. Do you know of any card that can also retain p and q and generate (calculate) dp, dq, pq, and public modulus. This is contrary to the specification so I doubt there would be any, but it is always good to ask.
    2. Do any of you have a Java code that would do this (ie. calculate the missing key components) that can be run on Java Card, ie. does not use BigInteger or similar classes.
    Cheers,
    Woj

    That is exactly the point I was trying to make, I actually forgot about this thread, because the problem at hand went on the shelf for the moment. To reformulate:
    1. I have only certain parts of the RSA key, but enough parts to determine a valid private/public key pair.
    2. Now I want to generate the missing parts on the card. The JC API requires all the parts to be supplied, it is not possible to provide only partial (but determining the whole key) key information. The KeyPair class can only retain the public exponent during key generation, but not the other parts (according to the specs and my own tests).
    3. My wild guess is that it would probably be doable without too much hassle with host JCE, but it's not an option for me, it has to be done on the card.
    4. I could try to write my own Java Card code that would do this based on, say, openssl implementation, but now I am too lazy, so that's why I asked if somebody possibly has the code that does this.
    Cheers,
    Woj

  • How to find modulus(n) and public key exponent(e)Sor

    I did the following code:
    import java.security.*;
    class keypair
    public static void main(String args[])
    try {
            KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
            keyGen.initialize(1024);
            KeyPair keypair = keyGen.genKeyPair();
            PrivateKey privateKey = keypair.getPrivate();
            PublicKey publicKey = keypair.getPublic();
            System.out.println(publicKey);
    catch (java.security.NoSuchAlgorithmException e) {
    }It produced the following output:
    E:\java>java keypair
    Sun RSA public key, 1024 bits
    modulus: 104598424699919432698042124865237006532583108525971624656815039032375
    *68185931249899603942873174007833898125332457427834491991685017307342129730049040*
    *85039266578793603162921901877391682504673766949037045217194339504369288262569809*
    *64618725280325930282787918761626276736975012559809247463223114702205350103039131*
    public exponent: 65537
    How to parse modulus(n) and public exponent(e) from this output?
    Similarly when i print private key, it produces the following output:
    E:\java>java keypair
    Sun RSA private CRT key, 1024 bits
    modulus:          124578817060208658480856678950235831207402457067036419284514
    *60119309486714863949162442643168408523979997168613499493638925829235693238993015*
    *36861462235708805467117179894466762970147852286192228334073408407380525883650965*
    *26200137024900438305422984852314541271126647102071346646999343089444655087519613*
    *147762713*
    public exponent:  65537
    private exponent: 938527844532658207604152892230342202756165450473898580852699
    *91069268853864683730106242370135012901790500054313488639918623825755509450966957*
    *25996151023641565209086629652161258725723528561744214714448113895688480371394495*
    *69970533766968335232379493089928062691491508442909468663624841001227918721233934*
    *90451285*
    prime p:          128112715803862066344339615342766575233634768887073748611821
    *70613165835421234259251719401979554816266892921739504796026180704477109334458578*
    *924582228715587*
    prime q:          972415706579323990162180646771186062588725555167352041581263
    *11833654947284058644791019214876691698044764118648637510099163830088827138987158*
    *06445271350899*
    prime exponent p: 102053075991522697645186596252261651077210381075096084960080
    *01572103324900452503753532555651687424478224695551102238145517644352533224205327*
    *850477437666141*
    prime exponent q: 668659136319899226645386130685620335239039277715133737489656
    *56694442226518700929665796129185316864860876985624927131126216000167126890435269*
    *81971346772483*
    crt coefficient:  337801534982286124613379128447816812903646302193598735486466
    *78634104811105616496519276355880320340688935923186965279527763125244878069735173*
    *60542121091569*
    E:\java>
    From this output how to parse n and d, where d is the secret exponent or decryption exponent? Thanks in advance. Apologies, for posting in this forum instead of cryptography forum.
    Edited by: sowndar on Nov 28, 2009 3:12 AM

    sowndar wrote:
    From this output how to parse n and d, where d is the secret exponent or decryption exponent? Why do you think you need to parse anything? Why do you need the modulus and exponents?
    P.S. Extract the public and private keys from the key pair, cast them to RSAPublicKey and RSAPrivateKey as appropriate then look at the methods of classes RSAPublicKey and RSAPrivateKey to see how to get modulus and exponents.

Maybe you are looking for