Skip to content

Commit a11e767

Browse files
committed
Publish v0.1.1 implement ParamData for Token
1 parent b5ee2d1 commit a11e767

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

Cargo.toml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "chuchi-crypto"
33
description = "Crypto library providing encryption and signing."
4-
version = "0.1.0"
4+
version = "0.1.1"
55
authors = ["Sören Meier <[email protected]>"]
66
repository = "https://github.com/chuchi-dev/chuchi-crypto"
77
homepage = "https://chuchi.dev/"
@@ -16,20 +16,20 @@ all-features = true
1616

1717
[features]
1818
cipher = [
19-
"zeroize",
20-
"poly1305",
21-
"universal-hash",
22-
"chacha20",
23-
"x25519-dalek",
24-
"generic-array",
19+
"zeroize",
20+
"poly1305",
21+
"universal-hash",
22+
"chacha20",
23+
"x25519-dalek",
24+
"generic-array",
2525
]
2626
signature = ["ed25519-dalek"]
2727

2828
b64 = ["base64"]
2929
serde = ["_serde"]
3030
hash = ["blake2", "generic-array"]
3131
protobuf = ["dep:protopuffer"]
32-
postgres = ["dep:postgres-types", "dep:bytes"]
32+
postgres = ["dep:postgres-types", "dep:bytes", "dep:chuchi-postgres"]
3333

3434
[dependencies]
3535
#cipher
@@ -38,13 +38,13 @@ poly1305 = { version = "0.8", optional = true }
3838
universal-hash = { version = "0.5", optional = true }
3939
chacha20 = { version = "0.9", optional = true }
4040
x25519-dalek = { version = "2.0", optional = true, features = [
41-
"static_secrets",
41+
"static_secrets",
4242
] }
4343

4444
#signature
4545
ed25519-dalek = { version = "2.0", optional = true, features = [
46-
"zeroize",
47-
"rand_core",
46+
"zeroize",
47+
"rand_core",
4848
] }
4949

5050
#hash
@@ -58,4 +58,5 @@ _serde = { package = "serde", version = "1.0", optional = true }
5858

5959
protopuffer = { version = "0.1", optional = true }
6060
postgres-types = { version = "0.2", optional = true }
61+
chuchi-postgres = { version = "0.1", optional = true }
6162
bytes = { version = "1.6", optional = true }

src/token/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ mod impl_postgres {
197197
use super::*;
198198

199199
use bytes::BytesMut;
200+
use chuchi_postgres::filter::ParamData;
200201
use postgres_types::{to_sql_checked, FromSql, IsNull, ToSql, Type};
201202

202203
impl<const SI: usize> ToSql for Token<SI> {
@@ -234,6 +235,12 @@ mod impl_postgres {
234235
<&str as FromSql>::accepts(ty)
235236
}
236237
}
238+
239+
impl<const SI: usize> ParamData for Token<SI> {
240+
fn is_null(&self) -> bool {
241+
false
242+
}
243+
}
237244
}
238245

239246
#[cfg(all(test, feature = "b64"))]

0 commit comments

Comments
 (0)