PublicKey class

A 2048-bit RSA public key for verifying PKCS #1 v1.5 signatures with SHA-256.

Properties

hashCode → int
A hash of the encoded public key.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

fingerprint() → Fingerprint
Returns a 256-bit unique identifier for this key, the SHA-256 hash of its little-endian modulus and exponent.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toBytes() → Uint8List
Serializes the public key into a 264-byte array.
toDer() → Uint8List
Serializes the public key into a DER buffer.
toPem() → String
Serializes the public key into a PUBLIC KEY PEM block with LF line endings.
toString() → String
A string representation of this object.
inherited
verify(Uint8List message, Signature signature) → void
Verifies signature against message.

Operators

operator ==(Object other) → bool
Whether other is an RSA public key with the same modulus and exponent.
override

Static Methods

fromBytes(Uint8List bytes) → PublicKey
Parses a 264-byte array into a public key.
fromDer(Uint8List der) → PublicKey
Parses a DER buffer into a public key.
fromPem(String pem) → PublicKey
Parses one PUBLIC KEY PEM block starting at the first character.