Skip to content

Releases: DatL4g/Sekret

2.0.0-alpha-05

26 May 16:56
f1f3d30
Compare
Choose a tag to compare

This release fixes some compile errors when using K2

2.0.0-alpha-04

14 Apr 15:06
3e87e73
Compare
Choose a tag to compare

This is a work in progress release as new features are added/planned.
Fixes some compile exceptions.

Take a look at the https://github.com/DatL4g/Sekret/releases/tag/v2.0.0-alpha-01 release first.

Common code

This release comes with a Sekret class that can be called from common code.

// Nullable as Desktop-JVM and Android may return null
// Native targets will never return null
// JS targets will never return null
val secretValue: String? = Sekret.getValue(key)

Plugin Configuration

sekret {
	/** Configuration for generating secrets */
    properties {
        enabled.set(true) // Important if you wan't to keep using generated secret
        packageName.set("your.package.name")
		// other value changes

		nativeCopy {
			desktopComposeResourcesFolder // set the location for desktop targets where the native binary should be placed
			androidJNIFolder // set the location for android where the native binary should be placed
		}
    }
}

Tasks

This release comes with new tasks to support minimal configuration.

  • copySekretNativeBinary Only copies the native binaries (Desktop-JVM and Android) to the specified directories
  • createSekretNativeBinary Compile secrets to native binaries
  • createAndCopySekretNativeBinary Combination of createSekretNativeBinary and copySekretNativeBinary
  • generateSekretBuildScript Generates a build script by checking your dependant target
  • generateSekret Generates secrets provided in properties

2.0.0-alpha-01

23 Jan 15:39
4115a34
Compare
Choose a tag to compare
2.0.0-alpha-01 Pre-release
Pre-release

This is a work in progress release as new features are added/planned.

Plugin Configuration

The sekret gradle plugin configuration changed to support minimal setup.

sekret {
	/** New obfuscation configuration */
    obfuscation {
        secretMask.set("###")
        secretMaskNull.set(true)
    }

	/** Configuration for generating secrets */
    properties {
        enabled.set(true) // Important if you wan't to keep using generated secret
        packageName.set("your.package.name")
		// other value changes
    }
}

Obfuscation

Planned multiplatform compatible equivalent: https://github.com/LSPosed/LSParanoid

Added multiplatform compatible equivalent: https://github.com/aafanasev/sekret

To use these features add the annotations dependecy to your build.gradle.kts:

dependencies {
	implementation("dev.datlag.sekret:annotations:<version>") // can be added to commonMain
}

Secret

You can apply a Secret annotation to data and value class properties to prevent accidentally leaking the values.

For example you log user info:

data class User(
	val name: String,
	@Secret val password: String
)

val user = User("my-name", "my-password")
println(user.toString())

// can still be called
login(user.name, user.password)

Will result in something like this:

User(name=my-name, password=***)

Supported types

Type Kotlin Java
String
StringBuilder
CharSequence
Appendable
StringBuffer NaN
CharArray

1.0.1

21 Jan 14:39
0d2f6ed
Compare
Choose a tag to compare

Added missing WASM targets.

Full Changelog: v1.0.0...v1.0.1

1.0.0

20 Jan 14:07
fa0b8fa
Compare
Choose a tag to compare

This is the first full working release working on all possible targets.

The project changed a lot since 0.4.0 and I recommend you to follow the README again to configure it correctly.