public class OpenSSHPublicKeyUtil extends Object
Modifier and Type | Method and Description |
---|---|
static byte[] |
encodePublicKey(AsymmetricKeyParameter cipherParameters)
Encode a public key from an AsymmetricKeyParameter instance.
|
static AsymmetricKeyParameter |
parsePublicKey(byte[] encoded)
Parse a public key.
|
static AsymmetricKeyParameter |
parsePublicKey(org.bouncycastle.crypto.util.SSHBuffer buffer)
Parse a public key from an SSHBuffer instance.
|
public static AsymmetricKeyParameter parsePublicKey(byte[] encoded)
This method accepts the bytes that are Base64 encoded in an OpenSSH public key file.
encoded
- The key.public static byte[] encodePublicKey(AsymmetricKeyParameter cipherParameters) throws IOException
cipherParameters
- The key to encode.IOException
public static AsymmetricKeyParameter parsePublicKey(org.bouncycastle.crypto.util.SSHBuffer buffer)
buffer
- containing the SSH public key.Copyright © 2021 BouncyCastle.org. All rights reserved.