mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-09 11:47:59 +00:00
Fix doc for CryptoStore::ecdsa_sign_prehashed() (#8876)
* fix ecdsa_sign_prehashed() doc * document both instances
This commit is contained in:
@@ -336,7 +336,7 @@ impl From<LogLevel> for log::Level {
|
||||
|
||||
/// Log level filter that expresses which log levels should be filtered.
|
||||
///
|
||||
/// This enum matches the [`log::LogLevelFilter`] enum.
|
||||
/// This enum matches the [`log::LevelFilter`] enum.
|
||||
#[derive(Encode, Decode, PassByEnum, Copy, Clone)]
|
||||
pub enum LogLevelFilter {
|
||||
/// `Off` log level filter.
|
||||
|
||||
@@ -195,13 +195,18 @@ pub trait CryptoStore: Send + Sync {
|
||||
transcript_data: VRFTranscriptData,
|
||||
) -> Result<Option<VRFSignature>, Error>;
|
||||
|
||||
/// Sign pre-hashed
|
||||
/// Generate an ECDSA signature for a given pre-hashed message.
|
||||
///
|
||||
/// Signs a pre-hashed message with the private key that matches
|
||||
/// the ECDSA public key passed.
|
||||
/// Receives [`KeyTypeId`] and an [`ecdsa::Public`] key to be able to map
|
||||
/// them to a private key that exists in the keystore. This private key is,
|
||||
/// in turn, used for signing the provided pre-hashed message.
|
||||
///
|
||||
/// Returns the SCALE encoded signature if key is found and supported,
|
||||
/// `None` if the key doesn't exist or an error when something failed.
|
||||
/// The `msg` argument provided should be a hashed message for which an
|
||||
/// ECDSA signature should be generated.
|
||||
///
|
||||
/// Returns an [`ecdsa::Signature`] or `None` in case the given `id` and
|
||||
/// `public` combination doesn't exist in the keystore. An `Err` will be
|
||||
/// returned if generating the signature itself failed.
|
||||
async fn ecdsa_sign_prehashed(
|
||||
&self,
|
||||
id: KeyTypeId,
|
||||
@@ -368,13 +373,18 @@ pub trait SyncCryptoStore: CryptoStore + Send + Sync {
|
||||
transcript_data: VRFTranscriptData,
|
||||
) -> Result<Option<VRFSignature>, Error>;
|
||||
|
||||
/// Sign pre-hashed
|
||||
/// Generate an ECDSA signature for a given pre-hashed message.
|
||||
///
|
||||
/// Signs a pre-hashed message with the private key that matches
|
||||
/// the ECDSA public key passed.
|
||||
/// Receives [`KeyTypeId`] and an [`ecdsa::Public`] key to be able to map
|
||||
/// them to a private key that exists in the keystore. This private key is,
|
||||
/// in turn, used for signing the provided pre-hashed message.
|
||||
///
|
||||
/// Returns the SCALE encoded signature if key is found and supported,
|
||||
/// `None` if the key doesn't exist or an error when something failed.
|
||||
/// The `msg` argument provided should be a hashed message for which an
|
||||
/// ECDSA signature should be generated.
|
||||
///
|
||||
/// Returns an [`ecdsa::Signature`] or `None` in case the given `id` and
|
||||
/// `public` combination doesn't exist in the keystore. An `Err` will be
|
||||
/// returned if generating the signature itself failed.
|
||||
fn ecdsa_sign_prehashed(
|
||||
&self,
|
||||
id: KeyTypeId,
|
||||
|
||||
Reference in New Issue
Block a user