Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.HashMap;

import java.util.Map;

public class Main {
    private static final Map KEYSIZES = new HashMap();

    static int getKeySize(String algorithm) {
        if (!KEYSIZES.containsKey(algorithm)) {
            throw new IllegalStateException("no key size for algorithm: " + algorithm);
        }

        return ((Integer) KEYSIZES.get(algorithm)).intValue();
    }
}