base64EncodeUrlSafe

Encode BIGNUM data as URl-safe Base64

We need url safe base64 encoding and openssl only gives us regular base64, so we convert it here. Also trim trailing '=' from data (see RFC).

The following replacements are done: * '+' is converted to '-' * '/' is converted to '_' * '=' terminates the output at this point, stripping all '=' chars

  1. char[] base64EncodeUrlSafe(T t)
  2. char[] base64EncodeUrlSafe(BIGNUM* bn)
    char[]
    base64EncodeUrlSafe
    (
    const BIGNUM* bn
    )

Return Value

Type: char[]

An array of chars with the base64 encoded data.

Meta