class Amber::Schema::COSE::KeyProvider

Overview

A process-wide provider contains immutable key material and supports an old key grace window during rotation. A fresh nonce and cipher context are still created for every message.

Defined in:

amber/schema/cose.cr

Constructors

Instance Method Summary

Constructor Detail

def self.from_env!(key_variable = "AMBER_WIRE_KEY", key_id_variable = "AMBER_WIRE_KEY_ID") : self #

There is intentionally no development fallback key. Applications must make encryption an explicit configuration decision.


[View source]
def self.new(key : Bytes, key_id : String) #

[View source]

Instance Method Detail

def add(key_id : String, key : Bytes) : self #

[View source]
def current_key : Bytes #

[View source]
def key_id : String #

[View source]
def resolve(key_id : Bytes) : Bytes | Nil #

[View source]