All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bouncycastle.its.asn1.Utils Maven / Gradle / Ivy

package org.bouncycastle.its.asn1;

import org.bouncycastle.util.Arrays;

class Utils
{
    /**
     * 
     *     OCTET STRING (SIZE(n))
     * 
*/ static byte[] octetStringFixed(byte[] octets, int n) { if (octets.length != n) { throw new IllegalArgumentException("octet string out of range"); } return octets; } /** *
     *     OCTET STRING (SIZE(1..32))
     * 
*/ static byte[] octetStringFixed(byte[] octets) { if (octets.length < 1 || octets.length > 32) { throw new IllegalArgumentException("octet string out of range"); } return Arrays.clone(octets); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy