Welcome to mirror list, hosted at ThFree Co, Russian Federation.

MaxFragmentLength.java « tls « crypto « bouncycastle « org « java « main « src « core - gitlab.com/quite/humla-spongycastle.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6bc61b0c78f221f86c85d78b99c4d6497ea48270 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package org.bouncycastle.crypto.tls;

public class MaxFragmentLength
{
    /*
     * RFC 3546 3.2.
     */
    public static final short pow2_9 = 1;
    public static final short pow2_10 = 2;
    public static final short pow2_11 = 3;
    public static final short pow2_12 = 4;

    public static boolean isValid(short maxFragmentLength)
    {
        return maxFragmentLength >= pow2_9 && maxFragmentLength <= pow2_12;
    }
}