Skip to content

Commit 523f90d

Browse files
committed
nostr: mark NIP-04 as deprecated in docs
Signed-off-by: Yuki Kishimoto <[email protected]>
1 parent 44a916a commit 523f90d

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

crates/nostr/src/nips/nip04.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
// Copyright (c) 2023-2024 Rust Nostr Developers
44
// Distributed under the MIT software license
55

6-
//! NIP04
6+
//! NIP-04
7+
//!
8+
//! <div class="warning"><strong>Unsecure!</strong> Deprecated in favor of NIP-17!</div>
79
//!
810
//! <https://github.com/nostr-protocol/nips/blob/master/04.md>
911
@@ -67,6 +69,8 @@ impl From<secp256k1::Error> for Error {
6769
}
6870

6971
/// Encrypt
72+
///
73+
/// <div class="warning"><strong>Unsecure!</strong> Deprecated in favor of NIP-17!</div>
7074
#[inline]
7175
#[cfg(feature = "std")]
7276
pub fn encrypt<T>(
@@ -81,6 +85,8 @@ where
8185
}
8286

8387
/// Encrypt
88+
///
89+
/// <div class="warning"><strong>Unsecure!</strong> Deprecated in favor of NIP-17!</div>
8490
pub fn encrypt_with_rng<R, T>(
8591
rng: &mut R,
8692
secret_key: &SecretKey,
@@ -113,6 +119,8 @@ where
113119
}
114120

115121
/// Decrypts content to bytes
122+
///
123+
/// <div class="warning"><strong>Unsecure!</strong> Deprecated in favor of NIP-17!</div>
116124
pub fn decrypt_to_bytes<S>(
117125
secret_key: &SecretKey,
118126
public_key: &PublicKey,
@@ -144,6 +152,8 @@ where
144152
}
145153

146154
/// Decrypts content to a UTF-8 string
155+
///
156+
/// <div class="warning"><strong>Unsecure!</strong> Deprecated in favor of NIP-17!</div>
147157
#[inline]
148158
pub fn decrypt<T>(
149159
secret_key: &SecretKey,

0 commit comments

Comments
 (0)