encodeToString

fun encodeToString(sArr: Array<Byte>, lineSep: Boolean): String

Encodes a raw byte array into a BASE64 String representation i accordance with RFC 2045.

Return

A BASE64 encoded array. Never null.

Parameters

sArr

The bytes to convert. If null or length 0 an empty array will be returned.

lineSep

Optional "\r\n" after 76 characters, unless end of file.No line separator will be in breach of RFC 2045 which specifies max 76 per line but will be a little faster.