Java Doc for PGPPublicKey.java in  » Security » Bouncy-Castle » org » bouncycastle » openpgp » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Security » Bouncy Castle » org.bouncycastle.openpgp 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.bouncycastle.openpgp.PGPPublicKey

PGPPublicKey
public class PGPPublicKey implements PublicKeyAlgorithmTags(Code)
general class to handle a PGP public key object.


Field Summary
 ListidSigs
    
 ListidTrusts
    
 Listids
    
 ListkeySigs
    
 PublicKeyPacketpublicPk
    
 ListsubSigs
    
 TrustPackettrustPk
    

Constructor Summary
public  PGPPublicKey(int algorithm, PublicKey pubKey, Date time, String provider)
     Create a PGPPublicKey from the passed in JCA one.
 PGPPublicKey(PublicKeyPacket publicPk, TrustPacket trustPk, List sigs)
    
 PGPPublicKey(PGPPublicKey key, TrustPacket trust, List subSigs)
    
 PGPPublicKey(PGPPublicKey pubKey)
     Copy constructor.
 PGPPublicKey(PublicKeyPacket publicPk, TrustPacket trustPk, List keySigs, List ids, List idTrusts, List idSigs)
    
 PGPPublicKey(PublicKeyPacket publicPk, List ids, List idSigs)
    

Method Summary
public static  PGPPublicKeyaddCertification(PGPPublicKey key, String id, PGPSignature certification)
     Add a certification to the given public key.
Parameters:
  key - the key the certification is to be added to.
Parameters:
  id - the id the certification is associated with.
Parameters:
  certification - the new certification.
public static  PGPPublicKeyaddCertification(PGPPublicKey key, PGPSignature certification)
     Add a revocation or some other key certification to a key.
Parameters:
  key - the key the revocation is to be added to.
Parameters:
  certification - the key signature to be added.
public  voidencode(OutputStream outStream)
    
public  intgetAlgorithm()
     Return the algorithm code associated with the public key.
public  intgetBitStrength()
     Return the strength of the key in bits.
public  DategetCreationTime()
    
public  byte[]getEncoded()
    
public  byte[]getFingerprint()
     Return the fingerprint of the key.
public  PublicKeygetKey(String provider)
     Return the public key contained in the object.
Parameters:
  provider - provider to construct the key for.
public  longgetKeyID()
     Return the keyID associated with the public key.
public  IteratorgetSignatures()
     Return all signatures/certifications associated with this key.
public  IteratorgetSignaturesForID(String id)
     Return any signatures associated with the passed in id.
Parameters:
  id - the id to be matched.
public  IteratorgetSignaturesForUserAttribute(PGPUserAttributeSubpacketVector userAttributes)
     Return an iterator of signatures associated with the passed in user attributes.
Parameters:
  userAttributes - the vector of user attributes to be matched.
public  IteratorgetSignaturesOfType(int signatureType)
     Return signatures of the passed in type that are on this key.
Parameters:
  signatureType - the type of the signature to be returned.
public  byte[]getTrustData()
     Return the trust data associated with the public key, if present.
public  IteratorgetUserAttributes()
     Return any user attribute vectors associated with the key.
public  IteratorgetUserIDs()
     Return any userIDs associated with the key.
public  intgetValidDays()
    
public  longgetValidSeconds()
    
public  intgetVersion()
    
public  booleanisEncryptionKey()
     Return true if this key is marked as suitable for using for encryption.
public  booleanisMasterKey()
     Return true if this is a master key.
public  booleanisRevoked()
     Check whether this (sub)key has a revocation signature on it.
public static  PGPPublicKeyremoveCertification(PGPPublicKey key, String id)
     Remove any certifications associated with a given id on a key.
Parameters:
  key - the key the certifications are to be removed from.
Parameters:
  id - the id that is to be removed.
public static  PGPPublicKeyremoveCertification(PGPPublicKey key, String id, PGPSignature certification)
     Remove any certifications associated with a given id on a key.
Parameters:
  key - the key the certifications are to be removed from.
Parameters:
  id - the id that the certfication is to be removed from.
Parameters:
  certification - the certfication to be removed.

Field Detail
idSigs
List idSigs(Code)



idTrusts
List idTrusts(Code)



ids
List ids(Code)



keySigs
List keySigs(Code)



publicPk
PublicKeyPacket publicPk(Code)



subSigs
List subSigs(Code)



trustPk
TrustPacket trustPk(Code)




Constructor Detail
PGPPublicKey
public PGPPublicKey(int algorithm, PublicKey pubKey, Date time, String provider) throws PGPException, NoSuchProviderException(Code)
Create a PGPPublicKey from the passed in JCA one.

Note: the time passed in affects the value of the key's keyID, so you probably only want to do this once for a JCA key, or make sure you keep track of the time you used.
Parameters:
  algorithm - asymmetric algorithm type representing the public key.
Parameters:
  pubKey - actual public key to associate.
Parameters:
  time - date of creation.
Parameters:
  provider - provider to use for underlying digest calculations.
throws:
  PGPException - on key creation problem.
throws:
  NoSuchProviderException - if the specified provider is required and cannot be found.




PGPPublicKey
PGPPublicKey(PublicKeyPacket publicPk, TrustPacket trustPk, List sigs) throws IOException(Code)



PGPPublicKey
PGPPublicKey(PGPPublicKey key, TrustPacket trust, List subSigs)(Code)



PGPPublicKey
PGPPublicKey(PGPPublicKey pubKey)(Code)
Copy constructor.
Parameters:
  pubKey - the public key to copy.



PGPPublicKey
PGPPublicKey(PublicKeyPacket publicPk, TrustPacket trustPk, List keySigs, List ids, List idTrusts, List idSigs) throws IOException(Code)



PGPPublicKey
PGPPublicKey(PublicKeyPacket publicPk, List ids, List idSigs) throws IOException(Code)




Method Detail
addCertification
public static PGPPublicKey addCertification(PGPPublicKey key, String id, PGPSignature certification)(Code)
Add a certification to the given public key.
Parameters:
  key - the key the certification is to be added to.
Parameters:
  id - the id the certification is associated with.
Parameters:
  certification - the new certification. the re-certified key.



addCertification
public static PGPPublicKey addCertification(PGPPublicKey key, PGPSignature certification)(Code)
Add a revocation or some other key certification to a key.
Parameters:
  key - the key the revocation is to be added to.
Parameters:
  certification - the key signature to be added. the new changed public key object.



encode
public void encode(OutputStream outStream) throws IOException(Code)



getAlgorithm
public int getAlgorithm()(Code)
Return the algorithm code associated with the public key. int



getBitStrength
public int getBitStrength()(Code)
Return the strength of the key in bits. bit strenght of key.



getCreationTime
public Date getCreationTime()(Code)
creation time of key.



getEncoded
public byte[] getEncoded() throws IOException(Code)



getFingerprint
public byte[] getFingerprint()(Code)
Return the fingerprint of the key. key fingerprint.



getKey
public PublicKey getKey(String provider) throws PGPException, NoSuchProviderException(Code)
Return the public key contained in the object.
Parameters:
  provider - provider to construct the key for. a JCE/JCA public key.
throws:
  PGPException - if the key algorithm is not recognised.
throws:
  NoSuchProviderException - if the provider cannot be found.



getKeyID
public long getKeyID()(Code)
Return the keyID associated with the public key. long



getSignatures
public Iterator getSignatures()(Code)
Return all signatures/certifications associated with this key. an iterator (possibly empty) with all signatures/certifications.



getSignaturesForID
public Iterator getSignaturesForID(String id)(Code)
Return any signatures associated with the passed in id.
Parameters:
  id - the id to be matched. an iterator of PGPSignature objects.



getSignaturesForUserAttribute
public Iterator getSignaturesForUserAttribute(PGPUserAttributeSubpacketVector userAttributes)(Code)
Return an iterator of signatures associated with the passed in user attributes.
Parameters:
  userAttributes - the vector of user attributes to be matched. an iterator of PGPSignature objects.



getSignaturesOfType
public Iterator getSignaturesOfType(int signatureType)(Code)
Return signatures of the passed in type that are on this key.
Parameters:
  signatureType - the type of the signature to be returned. an iterator (possibly empty) of signatures of the given type.



getTrustData
public byte[] getTrustData()(Code)
Return the trust data associated with the public key, if present. a byte array with trust data, null otherwise.



getUserAttributes
public Iterator getUserAttributes()(Code)
Return any user attribute vectors associated with the key. an iterator of PGPUserAttributeSubpacketVector objects.



getUserIDs
public Iterator getUserIDs()(Code)
Return any userIDs associated with the key. an iterator of Strings.



getValidDays
public int getValidDays()(Code)
number of valid days from creation time - zero means noexpiry.



getValidSeconds
public long getValidSeconds()(Code)
number of valid seconds from creation time - zero means noexpiry.



getVersion
public int getVersion()(Code)
the version of this key.



isEncryptionKey
public boolean isEncryptionKey()(Code)
Return true if this key is marked as suitable for using for encryption. true if this key is marked as suitable for using for encryption.



isMasterKey
public boolean isMasterKey()(Code)
Return true if this is a master key. true if a master key.



isRevoked
public boolean isRevoked()(Code)
Check whether this (sub)key has a revocation signature on it. boolean indicating whether this (sub)key has been revoked.



removeCertification
public static PGPPublicKey removeCertification(PGPPublicKey key, String id)(Code)
Remove any certifications associated with a given id on a key.
Parameters:
  key - the key the certifications are to be removed from.
Parameters:
  id - the id that is to be removed. the re-certified key, null if the id was not found on the key.



removeCertification
public static PGPPublicKey removeCertification(PGPPublicKey key, String id, PGPSignature certification)(Code)
Remove any certifications associated with a given id on a key.
Parameters:
  key - the key the certifications are to be removed from.
Parameters:
  id - the id that the certfication is to be removed from.
Parameters:
  certification - the certfication to be removed. the re-certified key, null if the certification was not found.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.