pub fn to_jwk(&self, secret: &[u8]) -> Jwk {
        let k = base64::encode_config(secret, base64::URL_SAFE_NO_PAD);

        let mut jwk = Jwk::new("oct");
        jwk.set_key_use("sig");
        jwk.set_key_operations(vec!["sign", "verify"]);
        jwk.set_algorithm(self.name());
        jwk.set_parameter("k", Some(Value::String(k))).unwrap();

        jwk
    }
/// Make a JWK encoded oct private key.
///
/// # Arguments
/// * `secret` - A secret key
Make a JWK encoded oct private key.
Make a JWK encoded oct private key .
pub fn to_jwk(&self, secret: &[u8]) -> Jwk {
        let k = base64::encode_config(secret, base64::URL_SAFE_NO_PAD);
        let mut jwk = Jwk::new("oct");
        jwk.set_key_use("sig");
        jwk.set_key_operations(vec!["sign", "verify"]);
        jwk.set_algorithm(self.name());
        jwk.set_parameter("k", Some(Value::String(k))).unwrap();
        jwk
    }
pub fn to_jwk ( & self , secret : & [ u8 ] ) -> Jwk { let k = base64 :: encode_config ( secret , base64 :: URL_SAFE_NO_PAD ) ; let mut jwk = Jwk :: new ( " " ) ; jwk . set_key_use ( " " ) ; jwk . set_key_operations ( vec ! [ " " " " ] ) ; jwk . set_algorithm ( self . name ( ) ) ; jwk . set_parameter ( " " , Some ( Value :: String ( k ) ) ) . unwrap ( ) ; jwk }
Make a JWK encoded oct private key.
Make a JWK encoded oct private key .
&self
secret
&[u8]
&self
secret
&[u8]