API Docs for: 1.3.12
Show:

EcPk Class

Helper classes for dealing with RSA Public Keys.

Item Index

Methods

equals

(
  • obj
)
Boolean

Compares two public keys, and returns true if their PEM forms match.

Parameters:

  • obj EcPk

    Object to compare to.

Returns:

Boolean:

True if the keys match.

fingerprint

() String

Hashes the public key into an SSH compatible fingerprint.

Returns:

String:

Public key fingerprint.

fromPem

(
  • pem
)
EcPk static

Decodes a PEM encoded SubjectPublicKeyInfo (PKCS#8) or RSAPublicKey (PKCS#1) formatted RSA Public Key. (In case you were curious.)

Parameters:

  • pem String

    PEM as a string.

Returns:

EcPk:

Object used to perform public key operations.

toPem

() String

Encodes the public key into a PEM encoded SubjectPublicKeyInfo (PKCS#8) formatted RSA Public Key. (In case you were curious.)

Returns:

String:

PEM encoded public key without whitespace.

toPkcs1Pem

() String

Encodes the public key into a PEM encoded RSAPublicKey (PKCS#1) formatted RSA Public Key. (In case you were curious.)

Returns:

String:

PEM encoded public key without whitespace.

toPkcs8Pem

() String

Encodes the public key into a PEM encoded SubjectPublicKeyInfo (PKCS#8) formatted RSA Public Key. (In case you were curious.)

Returns:

String:

PEM encoded public key without whitespace.