Skip to content

Module cryptography-serialization-asn1-modules

ASN.1 modules/declarations from different RFCs, f.e. SubjectPublicKeyInfo from RFC5280 and PrivateKeyInfo from RFC5208

The module is currently experimental and is subject to API/ABI changes

Example

val rsaPublicKey: ByteArray = TODO("...")

val spkiPublicKey: ByteArray = DER.encodeToByteArray(
    SubjectPublicKeyInfo(ObjectIdentifier.RSA, rsaPublicKey)
)

Using in your projects

dependencies {
    implementation("dev.whyoleg.cryptography:cryptography-serialization-asn1-modules:0.4.0")
}

Package dev.whyoleg.cryptography.serialization.asn1.modules

ASN.1 modules/declarations from different RFCs, f.e. SubjectPublicKeyInfo from RFC5280 and PrivateKeyInfo from RFC5208