pub fn new_secret() -> StringExpand description
A new Standard Webhooks secret for an endpoint: whsec_ and 32 random bytes in base64.
Show it to the user once, store it (encrypted, see
encryption), and pass it to deliver.
ยงExamples
let secret = ocre::webhooks::new_secret();
assert!(secret.starts_with("whsec_") && secret.len() == 6 + 44);
assert!(ocre::webhooks::sign_standard(&secret, "msg_1", 0, b"{}").is_ok());