Package org.jclouds.digitalocean2.ssh
Class ECDSAKeys
java.lang.Object
org.jclouds.digitalocean2.ssh.ECDSAKeys
Utility methods to work with ECDSA Elliptic Curve DSA keys.
Methods in this class should be moved to the SshKeys class.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ECPointdecodeECPoint(byte[] M, EllipticCurve curve) Decode an OctetString to EllipticCurvePoint according to SECG 2.3.4static Stringstatic byte[]encodeECPoint(ECPoint group, EllipticCurve curve) Encode EllipticCurvePoint to an OctetStringstatic Stringfingerprint(ECPublicKey publicKey) Create a fingerprint per the following specstatic StringfingerprintPublicKey(String publicKeyOpenSSH) static ECPublicKeySpecpublicKeySpecFromOpenSSH(com.google.common.io.ByteSource supplier) ReturnsDSAPublicKeySpecwhich was OpenSSH Base64 Encodedid_rsa.pubstatic ECPublicKeySpecpublicKeySpecFromOpenSSH(String ecDsaPub) Executeson the string which was OpenSSH Base64 Encodedinvalid reference
org.jclouds.crypto.Pems#publicKeySpecFromOpenSSH(com.google.common.io.InputSupplier)id_rsa.pub
-
Field Details
-
ECDSA_SHA2_PREFIX
- See Also:
-
-
Constructor Details
-
ECDSAKeys
public ECDSAKeys()
-
-
Method Details
-
encodeAsOpenSSH
-
publicKeySpecFromOpenSSH
Executeson the string which was OpenSSH Base64 Encodedinvalid reference
org.jclouds.crypto.Pems#publicKeySpecFromOpenSSH(com.google.common.io.InputSupplier)id_rsa.pub- Parameters:
idRsaPub- formattedssh-dss AAAAB3NzaC1yc2EAAAADAQABAAAB...- See Also:
-
publicKeySpecFromOpenSSH
public static ECPublicKeySpec publicKeySpecFromOpenSSH(com.google.common.io.ByteSource supplier) throws IOException ReturnsDSAPublicKeySpecwhich was OpenSSH Base64 Encodedid_rsa.pub- Parameters:
supplier- the input stream factory, formattedssh-dss AAAAB3NzaC1yc2EAAAADAQABAAAB...- Returns:
- the
DSAPublicKeySpecwhich was OpenSSH Base64 Encodedid_rsa.pub - Throws:
IOException- if an I/O error occurs
-
fingerprintPublicKey
- Parameters:
publicKeyOpenSSH- RSA public key in OpenSSH format- Returns:
- fingerprint ex.
2b:a9:62:95:5b:8b:1d:61:e0:92:f7:03:10:e9:db:d9 - Throws:
IOException
-
fingerprint
Create a fingerprint per the following spec- Returns:
- hex fingerprint ex.
2b:a9:62:95:5b:8b:1d:61:e0:92:f7:03:10:e9:db:d9
-
encodeECPoint
Encode EllipticCurvePoint to an OctetString -
decodeECPoint
Decode an OctetString to EllipticCurvePoint according to SECG 2.3.4
-