[][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>

Write randomly generated PKCS#8 private key to the file at the given path.

If the file does not exist, it will be created with a mode of FILE_MODE (i.e. 600). If the file does exist, it will be erased and replaced.

Loading content...

Implementors

Loading content...