mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-11-09 12:17:07 +00:00
[offchain] Support for sign & verify for crypto keys (#3023)
* Implement sign & verify. * Use phrases and password. * Sign & verify with authority keys. * Fix tests. * WiP * WiP * Allow the caller to decide on 'CryptoKind'. * Remove TODO. * Make seed private back. * Fix non-std build and bump version. * Use Into<u32> instead of asses. * Add missing typedef.
This commit is contained in:
1 parent
ed630e5eda
commit
e729dbabbe
22 files changed
+647
-178
No files matched your search
@@ -250,6 +250,7 @@ impl offchain::Externalities for NeverOffchainExt {
|
||||
fn encrypt(
|
||||
&mut self,
|
||||
_key: Option<offchain::CryptoKeyId>,
|
||||
_kind: offchain::CryptoKind,
|
||||
_data: &[u8],
|
||||
) -> Result<Vec<u8>, ()> {
|
||||
unreachable!()
|
||||
@@ -258,18 +259,25 @@ impl offchain::Externalities for NeverOffchainExt {
|
||||
fn decrypt(
|
||||
&mut self,
|
||||
_key: Option<offchain::CryptoKeyId>,
|
||||
_kind: offchain::CryptoKind,
|
||||
_data: &[u8],
|
||||
) -> Result<Vec<u8>, ()> {
|
||||
unreachable!()
|
||||
}
|
||||
|
||||
fn sign(&mut self, _key: Option<offchain::CryptoKeyId>, _data: &[u8]) -> Result<Vec<u8>, ()> {
|
||||
fn sign(
|
||||
&mut self,
|
||||
_key: Option<offchain::CryptoKeyId>,
|
||||
_kind: offchain::CryptoKind,
|
||||
_data: &[u8],
|
||||
) -> Result<Vec<u8>, ()> {
|
||||
unreachable!()
|
||||
}
|
||||
|
||||
fn verify(
|
||||
&mut self,
|
||||
_key: Option<offchain::CryptoKeyId>,
|
||||
_kind: offchain::CryptoKind,
|
||||
_msg: &[u8],
|
||||
_signature: &[u8],
|
||||
) -> Result<bool, ()> {
|
||||
|
||||
Reference in new issue
Block a user