Skip to content

A simple maven plugin to generate an AES encryption key and convert it to BASE64 encoded string during maven build time.

License

Notifications You must be signed in to change notification settings

agogs/securekey-maven-plugin

Repository files navigation

securekey-maven-plugin

This plugin is used to generate a AES key using javax.crypto.SecretKey which is then Base64 encoded during build time and store it in the file system. The "secret" to generate the key is passed as a parameter in the plugin configuration

JDk8 Build Status

This plugin is available on maven central

Apache Maven

<plugins>
    .
    .
    .
    <plugin>
        <groupId>com.github.agogs</groupId>
        <artifactId>securekey-maven-plugin</artifactId>
        <executions>
            <execution>
                <configuration>
                    <keySize>256</keySize>                      <!-- optional, default is 128 bits-->
                    <algorithm>AES</algorithm>
                    <secret>secret</secret>                     <!-- optional, default = random string -->
                    <fileName>key.properties</fileName>         <!-- optional, default = securekey.properties -->
                    <filePath>/path/to/file</filePath>          <!-- optional, default is project root-->
                    <propertyName>property.name</propertyName>  <!-- optional, default = secure.key.encoded -->
                </configuration>
            </execution>
        </executions>
    </plugin>
    .
    .
    .
</plugins>

About

A simple maven plugin to generate an AES encryption key and convert it to BASE64 encoded string during maven build time.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published