Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.security.Key;

public class Main {
    /**
     * Returns true if the key is an RSA public or private key.
     */
    public static boolean isRsaKey(Key key) {
        return "RSA".equals(key.getAlgorithm());
    }
}