Poly1305

class Poly1305

Poly1305 message authentication code, designed by D. J. Bernstein.

Poly1305 computes a 128-bit (16 bytes) authenticator, using a 128 bit nonce and a 256 bit key consisting of a 128 bit key applied to an underlying cipher, and a 128 bit key (with 106 effective key bits) used in the authenticator.

The polynomial calculation in this implementation is adapted from the public domain poly1305-donna-unrolled C implementation by Andrew M (@floodyberry).

See also

Poly1305KeyGenerator

Constructors

Poly1305
Link copied to clipboard
common
fun Poly1305()

Types

Companion
Link copied to clipboard
common
object Companion

Functions

doFinal
Link copied to clipboard
common
fun doFinal(out: ByteArray, outOff: Int): Int
getAlgorithmName
Link copied to clipboard
common
fun getAlgorithmName(): String
getMacSize
Link copied to clipboard
common
fun getMacSize(): Int
reset
Link copied to clipboard
common
fun reset()
setKey
Link copied to clipboard
common
fun setKey(key: ByteArray)
update
Link copied to clipboard
common
fun update(in: Byte)
fun update(in: ByteArray, inOff: Int, len: Int)