@knolo/cli 6.1.0 → 6.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,6 +2,12 @@ use std::collections::{HashMap, HashSet};
2
2
  use std::error::Error;
3
3
  use std::fmt::{Display, Formatter};
4
4
 
5
+ mod kar;
6
+ pub use kar::{
7
+ create_kar_dossier_v5, evaluate_kar_v5, render_kar_dossier, verify_kar_dossier_v5, verify_kar_v5,
8
+ KarDossier, KarEvaluation, KarRunError, KarVerification,
9
+ };
10
+
5
11
  #[derive(Debug, Clone)]
6
12
  pub enum KnoloError {
7
13
  InvalidPack(String),
@@ -2012,7 +2018,7 @@ fn digest_raw(digest: &str) -> Vec<u8> { let hex = digest.strip_prefix("sha256-"
2012
2018
  fn le_u16(bytes: &[u8], offset: usize) -> Result<u16, KnoloError> { Ok(u16::from_le_bytes(read_slice(bytes, &mut offset.clone(), 2)?.try_into().unwrap())) }
2013
2019
 
2014
2020
  // Minimal SHA-256 implementation for the dependency-free Rust kernel.
2015
- fn sha256(input: &[u8]) -> [u8; 32] {
2021
+ pub(crate) fn sha256(input: &[u8]) -> [u8; 32] {
2016
2022
  const K: [u32; 64] = [
2017
2023
  0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,
2018
2024
  0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,