BER_encode

Encrypt a key using PKCS #8 encryption

  1. SecureArray!ubyte BER_encode(PrivateKey key)
  2. Vector!ubyte BER_encode(PrivateKey key, RandomNumberGenerator rng, string pass, Duration dur, string pbe_algo)
    static if(BOTAN_HAS_PUBLIC_KEY_CRYPTO)
    Vector!ubyte
    BER_encode
    (,,
    in string pass
    ,
    Duration dur = 300.msecs
    ,
    in string pbe_algo = ""
    )

Parameters

key PrivateKey

the key to encode

rng RandomNumberGenerator

the rng to use

pass string

the password to use for encryption

dur Duration

number of time to run the password derivation

pbe_algo string

the name of the desired password-based encryption algorithm; if empty ("") a reasonable (portable/secure) default will be chosen.

Return Value

Type: Vector!ubyte

encrypted key in binary BER form

Meta