Class JcaMTCSignatureVerifier.Builder

  • Enclosing class:
    JcaMTCSignatureVerifier

    public static class JcaMTCSignatureVerifier.Builder
    extends java.lang.Object
    Builder for JcaMTCSignatureVerifier. Selects the JCA provider used to obtain the underlying Signature instance; the draft algorithm identifier is either detected from the public key type (build(PublicKey) — see JcaMTCSignatureVerifier.detectAlgorithm(java.security.PublicKey)) or supplied explicitly (build(String, PublicKey)).
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • build

        public JcaMTCSignatureVerifier build​(java.security.PublicKey publicKey)
        Parameters:
        publicKey - JCA public key whose type determines the MTC signature algorithm string (see JcaMTCSignatureVerifier.detectAlgorithm(java.security.PublicKey))
        Throws:
        java.lang.IllegalArgumentException - if the public key type is unsupported
      • build

        public JcaMTCSignatureVerifier build​(java.lang.String algorithm,
                                             java.security.PublicKey publicKey)
        Explicit-algorithm overload for cases where the key-type detection in build(PublicKey) doesn't apply (e.g. a key whose getAlgorithm() doesn't carry the MTC algorithm name).
        Parameters:
        algorithm - one of the MTCSignatureAlgorithm constants
        publicKey - JCA public key for algorithm