rozdzial9
Class Utils

java.lang.Object
  extended byrozdzial2.Utils
      extended byrozdzial3.Utils
          extended byrozdzial4.Utils
              extended byrozdzial5.Utils
                  extended byrozdzial6.Utils
                      extended byrozdzial7.Utils
                          extended byrozdzial8.Utils
                              extended byrozdzial9.Utils
Direct Known Subclasses:
Utils

public class Utils
extends Utils

Klasa narzędziowa do rozdziału 9.


Field Summary
static char[] KEY_PASSWD
           
 
Fields inherited from class rozdzial8.Utils
END_ENTITY_ALIAS, INTERMEDIATE_ALIAS, ROOT_ALIAS
 
Constructor Summary
Utils()
           
 
Method Summary
static java.security.cert.PKIXCertPathBuilderResult buildPath(java.security.cert.X509Certificate rootCert, java.security.cert.X509CertSelector endConstraints, java.security.cert.CertStore certsAndCRLs)
          Buduje ścieżkę zaczynającą się od podanego punktu zaufania, uwzględniającą przekazane ograniczenia certyfikatu końcowego i repozytorium certyfikatów.
static java.security.KeyStore createCredentials()
          Tworzy repozytorium kluczy zawierający prywatne dane identyfikacyjne z łańcuchem certyfikatów i punktem zaufania.
static MimeMessage createMimeMessage(java.lang.String subject, java.lang.Object content, java.lang.String contentType)
          Tworzy wiadomość MIME na podstawie przekazanej treści.
 
Methods inherited from class rozdzial8.Utils
createEndEntityCredential, createIntermediateCredential, createRootCredential
 
Methods inherited from class rozdzial7.Utils
generateEndEntityCert, generateIntermediateCert, generateRootCert
 
Methods inherited from class rozdzial6.Utils
generateRSAKeyPair
 
Methods inherited from class rozdzial4.Utils
createFixedRandom
 
Methods inherited from class rozdzial3.Utils
createCtrIvForAES, createKeyForAES, toByteArray, toString, toString
 
Methods inherited from class rozdzial2.Utils
toHex, toHex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_PASSWD

public static char[] KEY_PASSWD
Constructor Detail

Utils

public Utils()
Method Detail

createCredentials

public static java.security.KeyStore createCredentials()
                                                throws java.lang.Exception
Tworzy repozytorium kluczy zawierający prywatne dane identyfikacyjne z łańcuchem certyfikatów i punktem zaufania.

Throws:
java.lang.Exception

buildPath

public static java.security.cert.PKIXCertPathBuilderResult buildPath(java.security.cert.X509Certificate rootCert,
                                                                     java.security.cert.X509CertSelector endConstraints,
                                                                     java.security.cert.CertStore certsAndCRLs)
                                                              throws java.lang.Exception
Buduje ścieżkę zaczynającą się od podanego punktu zaufania, uwzględniającą przekazane ograniczenia certyfikatu końcowego i repozytorium certyfikatów.

Uwaga: ścieżka jest budowana z wyłączonym sprawdzaniem unieważnienia.

Throws:
java.lang.Exception

createMimeMessage

public static MimeMessage createMimeMessage(java.lang.String subject,
                                            java.lang.Object content,
                                            java.lang.String contentType)
                                     throws MessagingException
Tworzy wiadomość MIME na podstawie przekazanej treści.

Throws:
MessagingException


Przykłady do książki Kryptografia w Javie – Podstawy