Expand description
Key management for license signing and verification
This module provides key management functionality that works with the pluggable cryptographic architecture. It maintains backward compatibility with RSA keys while supporting new algorithms like Ed25519.
§Example
use licenz_core::keys::{CryptoKeyPair, KeyPair, KeySize};
use licenz_core::crypto::algorithm_ids;
// Legacy RSA key pair (backward compatible)
let rsa_keypair = KeyPair::generate(KeySize::Bits2048).unwrap();
// New algorithm-agnostic key pair
let ed25519_keypair = CryptoKeyPair::generate(algorithm_ids::ED25519).unwrap();
let rsa_keypair = CryptoKeyPair::generate(algorithm_ids::RSA_SHA256).unwrap();Structs§
- Crypto
KeyPair - Algorithm-agnostic key pair that works with any supported signature algorithm
- KeyPair
- RSA key pair for license signing
Enums§
- KeySize
- Supported RSA key sizes
Functions§
- extract_
public_ key - Extract the public key from a private key
- parse_
private_ key - Parse a private key from PEM format
- parse_
public_ key - Parse a public key from PEM format