Struct bsv_wasm::keypair::PrivateKey [−][src]
pub struct PrivateKey { /* fields omitted */ }Implementations
Finds the Public Key Point. Always returns the compressed point. To get the decompressed point: PublicKey::from_bytes(point).to_decompressed()
Native Exported Methods
Standard ECDSA Message Signing using SHA256 as the digestg
Encrypt a message to the public key of this private key.
pub fn decrypt_message(
&self,
ciphertext: &ECIESCiphertext,
sender_pub_key: &PublicKey
) -> Result<Vec<u8>, BSVErrors>
pub fn decrypt_message(
&self,
ciphertext: &ECIESCiphertext,
sender_pub_key: &PublicKey
) -> Result<Vec<u8>, BSVErrors>
Decrypt a message that was sent to the public key corresponding to this private key.
Trait Implementations
Performs the conversion.
type Anchor = Ref<'static, PrivateKey>
type Anchor = Ref<'static, PrivateKey>
The type that holds the reference to Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous. Read more
Recover a Self::Anchor from Self::Abi. Read more
type Anchor = RefMut<'static, PrivateKey>
type Anchor = RefMut<'static, PrivateKey>
Same as RefFromWasmAbi::Anchor
Same as RefFromWasmAbi::ref_from_abi
Auto Trait Implementations
impl RefUnwindSafe for PrivateKey
impl Send for PrivateKey
impl Sync for PrivateKey
impl Unpin for PrivateKey
impl UnwindSafe for PrivateKey
Blanket Implementations
Mutably borrows from an owned value. Read more
type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as IntoWasmAbi::Abi
Same as IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err. Read more