# KeyPairWrapper (sshj 0.4.0 API)
Date: 2011-06-06

## net.schmizz.sshj.userauth.keyprovider
Class KeyPairWrapper

    java.lang.Object
      net.schmizz.sshj.userauth.keyprovider.KeyPairWrapper

All Implemented Interfaces:
  KeyProvider

    public class KeyPairWrapper

extends Object
implements KeyProvider

A `KeyProvider` wrapper around `KeyPair`

Constructor Summary
`KeyPairWrapper(KeyPair kp)`
`KeyPairWrapper(PublicKey publicKey, PrivateKey privateKey)`

Method Summary
`PrivateKey` `getPrivate()`
`PublicKey` `getPublic()`
`KeyType` `getType()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### KeyPairWrapper

    public KeyPairWrapper(KeyPair kp)

### KeyPairWrapper

    public KeyPairWrapper(PublicKey publicKey,
                          PrivateKey privateKey)

Method Detail

### getPrivate

    public PrivateKey getPrivate()

  Specified by:
    `getPrivate` in interface `KeyProvider`
  Returns:
    the private key.

### getPublic

    public PublicKey getPublic()

  Specified by:
    `getPublic` in interface `KeyProvider`
  Returns:
    the public key.

### getType

    public KeyType getType()

  Specified by:
    `getType` in interface `KeyProvider`
  Returns:
    the `KeyType`.

Copyright © 2009-2011. All Rights Reserved.