# useInMemoryPgpKeys

open fun useInMemoryPgpKeys(@Nullable defaultSecretKey: @Nullable String, @Nullable defaultPassword: @Nullable String)(source)

Use the supplied ascii-armored in-memory PGP secret key and password instead of reading it from a keyring.

    signing {
        def secretKey = findProperty("mySigningKey")
        def password = findProperty("mySigningPassword")
        useInMemoryPgpKeys(secretKey, password)
    }

Content copied to clipboard

#### Since

5.4

open fun useInMemoryPgpKeys(@Nullable defaultKeyId: @Nullable String, @Nullable defaultSecretKey: @Nullable String, @Nullable defaultPassword: @Nullable String)(source)

Use the supplied ascii-armored in-memory PGP secret key and password instead of reading it from a keyring. In case a signing subkey is provided, keyId must be provided as well.

    signing {
        def keyId = findProperty("keyId")
        def secretKey = findProperty("mySigningKey")
        def password = findProperty("mySigningPassword")
        useInMemoryPgpKeys(keyId, secretKey, password)
    }

Content copied to clipboard

#### Since

6.0