001/*
002 * nimbus-jose-jwt
003 *
004 * Copyright 2012-2016, Connect2id Ltd and contributors.
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use
007 * this file except in compliance with the License. You may obtain a copy of the
008 * License at
009 *
010 *    http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software distributed
013 * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
014 * CONDITIONS OF ANY KIND, either express or implied. See the License for the
015 * specific language governing permissions and limitations under the License.
016 */
017
018package com.nimbusds.jose.crypto.impl;
019
020
021import java.util.Collections;
022import java.util.Set;
023
024import com.nimbusds.jose.JWSAlgorithm;
025
026
027/**
028 * The base abstract class for Edwards-curve Digital Signature Algorithm 
029 * (EdDSA) signers and validators of {@link com.nimbusds.jose.JWSObject JWS 
030 * objects}.
031 *
032 * <p>Supports the following algorithm:
033 *
034 * <ul>
035 *     <li>{@link com.nimbusds.jose.JWSAlgorithm#EdDSA}
036 * </ul>
037 * 
038 * @author Tim McLean
039 * @version 2018-07-11
040 */
041public abstract class EdDSAProvider extends BaseJWSProvider {
042
043
044        /**
045         * The supported JWS algorithms by the EdDSA provider class.
046         */
047        public static final Set<JWSAlgorithm> SUPPORTED_ALGORITHMS;
048
049
050        static {
051                SUPPORTED_ALGORITHMS = Collections.singleton(JWSAlgorithm.EdDSA);
052        }
053
054
055        /**
056         * Creates a new Edwards-curve Digital Signature Algorithm (EdDSA) 
057         * provider.
058         */
059        protected EdDSAProvider() {
060
061                super(SUPPORTED_ALGORITHMS);
062        }
063}
064