File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -76,11 +76,11 @@ impl VerifyingKey {
76
76
/// Returns the byte representation of the public key.
77
77
pub fn to_bytes ( & self ) -> Vec < u8 > {
78
78
match self {
79
- VerifyingKey :: Ed25519 ( vk) => vk. to_bytes ( ) . to_vec ( ) ,
80
- VerifyingKey :: Secp256k1 ( vk) => vk. to_sec1_bytes ( ) . to_vec ( ) ,
81
- VerifyingKey :: Secp256r1 ( vk) => vk. to_sec1_bytes ( ) . to_vec ( ) ,
82
- VerifyingKey :: Eip191 ( vk) => vk. to_sec1_bytes ( ) . to_vec ( ) ,
83
- VerifyingKey :: CosmosAdr36 ( vk) => vk. to_sec1_bytes ( ) . to_vec ( ) ,
79
+ VerifyingKey :: Ed25519 ( vk) => vk. as_bytes ( ) . to_vec ( ) ,
80
+ VerifyingKey :: Secp256k1 ( vk) => vk. to_encoded_point ( true ) . as_bytes ( ) . to_vec ( ) ,
81
+ VerifyingKey :: Secp256r1 ( vk) => vk. to_encoded_point ( true ) . as_bytes ( ) . to_vec ( ) ,
82
+ VerifyingKey :: Eip191 ( vk) => vk. to_encoded_point ( true ) . as_bytes ( ) . to_vec ( ) ,
83
+ VerifyingKey :: CosmosAdr36 ( vk) => vk. to_encoded_point ( true ) . as_bytes ( ) . to_vec ( ) ,
84
84
}
85
85
}
86
86
You can’t perform that action at this time.
0 commit comments