Search results

There are no results.

std.crypto.x509.PrivateKey

class pub PrivateKey

An X.509 private key.

This is currently just an opaque wrapper around a ByteArray.

Static methods

new

Show source code
Hide source code
fn pub static new(bytes: ByteArray) -> PrivateKey {
  PrivateKey(bytes)
}
fn pub static new(bytes: ByteArray) -> PrivateKey

Returns a new PrivateKey that wraps the given ByteArray.

Instance methods

!=

Show source code
Hide source code
fn pub !=(other: T) -> Bool {
  (self == other).false?
}
fn pub !=(other: T) -> Bool

Returns true if self and the given object are not equal to each other.

==

Show source code
Hide source code
fn pub ==(other: ref PrivateKey) -> Bool {
  @bytes == other.bytes
}
fn pub ==(other: ref PrivateKey) -> Bool

Returns true if self and the given object are equal to each other.

This operator is used to perform structural equality. This means two objects residing in different memory locations may be considered equal, provided their structure is equal. For example, two different arrays may be considered to have structural equality if they contain the exact same values.

fmt

Show source code
Hide source code
fn pub fmt(formatter: mut Formatter) {
  formatter.write('PrivateKey(${@bytes.size} bytes)')
}
fn pub fmt(formatter: mut Formatter)

Formats self in a human-readable format for debugging purposes.

Implemented traits

std.cmp.

Equal

impl Equal[ref PrivateKey] for PrivateKey
std.fmt.

Format

impl Format for PrivateKey