rozdzial7
Class Utils

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

public class Utils
extends Utils

Klasa narzędziowa do rozdziału 7.


Constructor Summary
Utils()
           
 
Method Summary
static java.security.cert.X509Certificate generateEndEntityCert(java.security.PublicKey entityKey, java.security.PrivateKey caKey, java.security.cert.X509Certificate caCert)
          Generuje przykładowy certyfikat V3 służący za certyfikat użytkownika końcowego.
static java.security.cert.X509Certificate generateIntermediateCert(java.security.PublicKey intKey, java.security.PrivateKey caKey, java.security.cert.X509Certificate caCert)
          Generuje przykładowy certyfikat V3 służący za certyfikat centrum pośredniego.
static java.security.cert.X509Certificate generateRootCert(java.security.KeyPair pair)
          Generuje przykładowy certyfikat V1 służący za certyfikat główny.
 
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
 

Constructor Detail

Utils

public Utils()
Method Detail

generateRootCert

public static java.security.cert.X509Certificate generateRootCert(java.security.KeyPair pair)
                                                           throws java.lang.Exception
Generuje przykładowy certyfikat V1 służący za certyfikat główny.

Throws:
java.lang.Exception

generateIntermediateCert

public static java.security.cert.X509Certificate generateIntermediateCert(java.security.PublicKey intKey,
                                                                          java.security.PrivateKey caKey,
                                                                          java.security.cert.X509Certificate caCert)
                                                                   throws java.lang.Exception
Generuje przykładowy certyfikat V3 służący za certyfikat centrum pośredniego.

Throws:
java.lang.Exception

generateEndEntityCert

public static java.security.cert.X509Certificate generateEndEntityCert(java.security.PublicKey entityKey,
                                                                       java.security.PrivateKey caKey,
                                                                       java.security.cert.X509Certificate caCert)
                                                                throws java.lang.Exception
Generuje przykładowy certyfikat V3 służący za certyfikat użytkownika końcowego.

Throws:
java.lang.Exception


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