[][src]Trait signatory::encoding::pkcs8::GeneratePkcs8

pub trait GeneratePkcs8: Sized + FromPkcs8 {
    fn generate_pkcs8() -> Result<SecretKey, Error>;

    fn generate_pkcs8_file<P: AsRef<Path>>(path: P) -> Result<File, Error> { ... }
}

Generate a random PKCS#8 private key of this type

Required methods

fn generate_pkcs8() -> Result<SecretKey, Error>

Randomly generate a PKCS#8 private key for this type loadable via from_pkcs8().

Loading content...

Provided methods

fn generate_pkcs8_file<P: AsRef<Path>>(path: P) -> Result<File, Error>

Encode self and write it to a file at the given path, returning the resulting File or a Error.

If the file does not exist, it will be created.

Loading content...

Implementors

Loading content...