Skip to content

Commit

Permalink
Bump heapless, no more generic-array
Browse files Browse the repository at this point in the history
  • Loading branch information
nickray committed Jun 10, 2021
1 parent 1eae80f commit 5871455
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cosey"
version = "0.2.0"
version = "0.3.0"
authors = ["Nicolas Stalder <[email protected]>"]
license = "Apache-2.0 OR MIT"
description = "Data types and serde for public COSE_Keys"
Expand All @@ -11,7 +11,7 @@ readme = "README.md"
edition = "2018"

[dependencies]
heapless-bytes = "0.2.0"
heapless-bytes = "0.3.0"
serde_repr = "0.1"

[dependencies.serde]
Expand Down
14 changes: 7 additions & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
}
*/

pub use heapless_bytes::{consts, Bytes as ByteBuf};
pub use heapless_bytes::Bytes;
use serde::Serialize;
use serde_repr::{Deserialize_repr, Serialize_repr};

Expand Down Expand Up @@ -142,8 +142,8 @@ trait PublicKeyConstants {

#[derive(Clone, Debug, Eq, PartialEq)]
pub struct P256PublicKey {
pub x: ByteBuf<consts::U32>,
pub y: ByteBuf<consts::U32>,
pub x: Bytes<32>,
pub y: Bytes<32>,
}

impl PublicKeyConstants for P256PublicKey {
Expand All @@ -154,8 +154,8 @@ impl PublicKeyConstants for P256PublicKey {

#[derive(Clone, Debug, Eq, PartialEq)]
pub struct EcdhEsHkdf256PublicKey {
pub x: ByteBuf<consts::U32>,
pub y: ByteBuf<consts::U32>,
pub x: Bytes<32>,
pub y: Bytes<32>,
}

impl PublicKeyConstants for EcdhEsHkdf256PublicKey {
Expand All @@ -166,7 +166,7 @@ impl PublicKeyConstants for EcdhEsHkdf256PublicKey {

#[derive(Clone, Debug, Eq, PartialEq)]
pub struct Ed25519PublicKey {
pub x: ByteBuf<consts::U32>,
pub x: Bytes<32>,
}

impl PublicKeyConstants for Ed25519PublicKey {
Expand All @@ -186,7 +186,7 @@ impl PublicKeyConstants for TotpPublicKey {

#[derive(Clone, Debug, Eq, PartialEq)]
pub struct X25519PublicKey {
pub pub_key: ByteBuf<consts::U32>,
pub pub_key: Bytes<32>,
}

// impl serde::Serialize for PublicKey {
Expand Down

0 comments on commit 5871455

Please sign in to comment.