Java Key Create getKeyPair()

Here you can find the source of getKeyPair()

Description

The method gets the key pair.

License

Open Source License

Return

a pair of keys

Declaration

public static KeyPair getKeyPair() 

Method Source Code


//package com.java2s;

import java.security.KeyPair;
import java.security.KeyPairGenerator;

public class Main {
    private static KeyPairGenerator kpg;

    /**// w  w  w. ja v a2  s . c o  m
     * The method gets the key pair.
     * @return a pair of keys
     */
    public static KeyPair getKeyPair() {
        return kpg.genKeyPair();
    }
}

Related

  1. getKeyManagerFactory(Map stores)
  2. getKeyManagers()
  3. getKeyManagers(KeyStore keyStore, String keyPassword)
  4. getKeyManagers(KeyStore ks, String password)
  5. getKeyPair()
  6. getKeyPair()
  7. getKeyPair(KeyStore keyStore, String alias, String password)
  8. getKeyPairGenerator(final String algorithm)
  9. getKeys()