hypersig/key
Types
pub type KeyError {
UnexpectedKeyFormat
ExpectedPublicKey
ExpectedPrivateKey
RuntimeError(String)
}
Constructors
-
UnexpectedKeyFormat -
ExpectedPublicKey -
ExpectedPrivateKey -
RuntimeError(String)
pub type PrivateKey
Values
pub fn decode_private(
pem: String,
) -> Result(PrivateKey, KeyError)
pub fn encode_private(key: PrivateKey) -> String
pub fn encode_public(key: PublicKey) -> String
pub fn generate_key_pair() -> Result(
#(PublicKey, PrivateKey),
KeyError,
)
pub fn sign(
message msg: String,
with key: PrivateKey,
) -> Result(String, KeyError)
Signs a message and returns the signature in a base64 encoded string