Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/third_party/rust/cose/src/   (Firefox Browser Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 1 kB image not shown  

Quelle  util.rs

  Sprache: Rust
 

use cbor::CborType;

/// Sig_structure is a CBOR array:
///
/// Sig_structure = [
///   context : "Signature" / "Signature1" / "CounterSignature",
///   body_protected : empty_or_serialized_map,
///   ? sign_protected : empty_or_serialized_map,
///   external_aad : bstr,
///   payload : bstr
/// ]
///
/// In this case, the context is "Signature". There is no external_aad, so this defaults to a
/// zero-length bstr.
pub fn get_sig_struct_bytes(
    protected_body_header_serialized: CborType,
    protected_signature_header_serialized: CborType,
    payload: &[u8],
) -> Vec<u8> {
    let sig_structure_array: Vec<CborType> = vec![CborType::String(String::from("Signature")),
                                                  protected_body_header_serialized,
                                                  protected_signature_header_serialized,
                                                  CborType::Null,
                                                  CborType::Bytes(payload.to_vec())];

    CborType::Array(sig_structure_array).serialize()
}

Messung V0.5 in Prozent
C=82 H=92 G=86

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet am  2026-06-18) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.