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

com.braintreegateway.encryption.Random Maven / Gradle / Ivy

There is a newer version: 2.1.0
Show newest version
package com.braintreegateway.encryption;

import java.security.SecureRandom;

public final class Random {
    public static byte[] secureRandomBytes(int size) {
        PRNGFixes.apply();
        SecureRandom random = new SecureRandom();
        byte[] keyBytes = new byte[size];
        random.nextBytes(keyBytes);
        return keyBytes;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy