Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static byte[] make_kb_16(String strKey) {
        return make_kb(strKey, 16);
    }

    private static byte[] make_kb(String strKey, int size) {
        byte[] kb = new byte[size];
        byte[] bytes = strKey.getBytes();
        System.arraycopy(bytes, 0, kb, 0, bytes.length > size ? size : bytes.length);
        return kb;
    }
}