Tabnine Logo
RSAPrivateKey.getAlgorithm
Code IndexAdd Tabnine to your IDE (free)

How to use
getAlgorithm
method
in
java.security.interfaces.RSAPrivateKey

Best Java code snippets using java.security.interfaces.RSAPrivateKey.getAlgorithm (Showing top 2 results out of 315)

origin: jenkinsci/jenkins

/**
 * Sign a message and base64 encode the signature.
 */
public String sign(String msg) {
  try {
    RSAPrivateKey key = getPrivateKey();
    Signature sig = Signature.getInstance(SIGNING_ALGORITHM + "with" + key.getAlgorithm());
    sig.initSign(key);
    sig.update(msg.getBytes("UTF-8"));
    return hudson.remoting.Base64.encode(sig.sign());
  } catch (GeneralSecurityException e) {
    throw new SecurityException(e);
  } catch (UnsupportedEncodingException e) {
    throw new AssertionError(e);    // UTF-8 is mandatory
  }
}
origin: org.jenkins-ci.main/jenkins-core

/**
 * Sign a message and base64 encode the signature.
 */
public String sign(String msg) {
  try {
    RSAPrivateKey key = getPrivateKey();
    Signature sig = Signature.getInstance(SIGNING_ALGORITHM + "with" + key.getAlgorithm());
    sig.initSign(key);
    sig.update(msg.getBytes("UTF-8"));
    return hudson.remoting.Base64.encode(sig.sign());
  } catch (GeneralSecurityException e) {
    throw new SecurityException(e);
  } catch (UnsupportedEncodingException e) {
    throw new AssertionError(e);    // UTF-8 is mandatory
  }
}
java.security.interfacesRSAPrivateKeygetAlgorithm

Popular methods of RSAPrivateKey

  • getModulus
  • getPrivateExponent
    Returns the private exponent d.
  • getEncoded
  • getFormat
  • <init>

Popular in Java

  • Creating JSON documents from java classes using gson
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (Timer)
  • runOnUiThread (Activity)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now