unpad

fun unpad(padded: ByteArray): String

Removes padding from NIP-44 padded data.

Validates the padding structure and extracts the original plaintext.

Return

The original plaintext string

Parameters

padded

The padded byte array

Throws

if padding is invalid