PrivateKey

jots.crypto.PrivateKey
See thePrivateKey companion object
sealed abstract class PrivateKey

A private key of an asymmetric public-private key pair.

Private keys are represented using PKCS #8 in DER using PrivateKey#toPkcs8 or alternatively in PEM-encoding using PrivateKey#toPkcs8Pem.

Functions are provided to convert from various formats.

- PrivateKey.fromPem accepts some PEM-encoded formats. - PrivateKey.fromPkcs1 accepts PKCS #1 RSA private key DER. - PrivateKey.fromPkcs8 accepts unmodified PKCS #8 DER. - PrivateKey.fromSec1 accepts SEC1 EC private key DER.

Note there are no checks for whether the key can be used, or if it belongs to a certain public-key cryptosystem (e.g. RSA).

Attributes

Companion
object
Source
PrivateKey.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

Returns the private key as bytes in the PKCS #8 DER format.

Returns the private key as bytes in the PKCS #8 DER format.

Attributes

Source
PrivateKey.scala

Returns the private key as PEM-encoded in the PKCS #8 DER format.

Returns the private key as PEM-encoded in the PKCS #8 DER format.

Attributes

Source
PrivateKey.scala