public static void setSessionTicketKeys(long ctx, SessionTicketKey[] keys) {
        if (keys == null || keys.length == 0) {
            throw new IllegalArgumentException("Length of the keys should be longer than 0.");
        }
        byte[] binaryKeys = new byte[keys.length * SessionTicketKey.TICKET_KEY_SIZE];
        for (int i = 0; i < keys.length; i++) {
            SessionTicketKey key = keys[i];
            int dstCurPos = SessionTicketKey.TICKET_KEY_SIZE * i;
            System.arraycopy(key.name, 0, binaryKeys, dstCurPos, SessionTicketKey.NAME_SIZE);
            dstCurPos += SessionTicketKey.NAME_SIZE;
            System.arraycopy(key.hmacKey, 0, binaryKeys, dstCurPos, SessionTicketKey.HMAC_KEY_SIZE);
            dstCurPos += SessionTicketKey.HMAC_KEY_SIZE;
            System.arraycopy(key.aesKey, 0, binaryKeys, dstCurPos, SessionTicketKey.AES_KEY_SIZE);
        }
        setSessionTicketKeys0(ctx, binaryKeys);
    }
public static void setSessionTicketKeys ( long ctx , SessionTicketKey [ ] keys ) { if ( keys == null || keys . length == 0 ) { throw new IllegalArgumentException ( "Length of the keys should be longer than 0." ) ; } byte [ ] binaryKeys = new byte [ keys . length * SessionTicketKey . TICKET_KEY_SIZE ] ; for ( int i = 0 ; i < keys . length ; i ++ ) { SessionTicketKey key = keys [ i ] ; int dstCurPos = SessionTicketKey . TICKET_KEY_SIZE * i ; System . arraycopy ( key . name , 0 , binaryKeys , dstCurPos , SessionTicketKey . NAME_SIZE ) ; dstCurPos += SessionTicketKey . NAME_SIZE ; System . arraycopy ( key . hmacKey , 0 , binaryKeys , dstCurPos , SessionTicketKey . HMAC_KEY_SIZE ) ; dstCurPos += SessionTicketKey . HMAC_KEY_SIZE ; System . arraycopy ( key . aesKey , 0 , binaryKeys , dstCurPos , SessionTicketKey . AES_KEY_SIZE ) ; } setSessionTicketKeys0 ( ctx , binaryKeys ) ; }
Set TLS session ticket keys.

<p> The first key in the list is the primary key. Tickets dervied from the other keys
in the list will be accepted but updated to a new ticket using the primary key. This
is useful for implementing ticket key rotation.
See <a href="https://tools.ietf.org/html/rfc5077">RFC 5077</a>

@param ctx Server or Client context to use
@param keys the {@link SessionTicketKey}s