pub fn sign(private_key: &H256, msg: &[u8]) -> Result<PackedEthSignature, failure::Error> {
        let secret_key = (*private_key).into();
        let signed_bytes = Self::message_to_signed_bytes(msg);
        let signature = sign(&secret_key, &signed_bytes)?;
        Ok(PackedEthSignature(signature))
    }
/// Signs message using ethereum private key, results are identical to signature created
/// using `geth`, `ethers.js`, etc. No hashing and prefixes required.
Signs message using ethereum private key, results are identical to signature created
using `geth`, `ethers.js`, etc. No hashing and prefixes required.
Signs message using ethereum private key results are identical to signature created using ` geth ` ` ethers . js ` etc . No hashing and prefixes required .
pub fn sign(private_key: &H256, msg: &[u8]) -> Result<PackedEthSignature, failure::Error> {
        let secret_key = (*private_key).into();
        let signed_bytes = Self::message_to_signed_bytes(msg);
        let signature = sign(&secret_key, &signed_bytes)?;
        Ok(PackedEthSignature(signature))
    }
pub fn sign ( private_key : & H256 , msg : & [ u8 ] ) -> Result < PackedEthSignature , failure :: Error > { let secret_key = ( * private_key ) . into ( ) ; let signed_bytes = Self :: message_to_signed_bytes ( msg ) ; let signature = sign ( & secret_key , & signed_bytes ) ? ; Ok ( PackedEthSignature ( signature ) ) }
Signs message using ethereum private key, results are identical to signature created
using `geth`, `ethers.js`, etc.
Signs message using ethereum private key results are identical to signature created using ` geth ` ` ethers . js ` etc .
private_key
&H256
msg
&[u8]