コード例 #1
0
        public SshKeyProvider(EncodingWrapper encoding, Base64Wrapper base64, IRsaKeyProvider rsaKeyProvider, IDsaKeyProvider dsaKeyProvider, IEcKeyProvider ecKeyProvider, SecureRandomGenerator randomGenerator)
        {
            this.encoding        = encoding;
            this.base64          = base64;
            this.rsaKeyProvider  = rsaKeyProvider;
            this.dsaKeyProvider  = dsaKeyProvider;
            this.ecKeyProvider   = ecKeyProvider;
            this.randomGenerator = randomGenerator;

            sshSupportedCurves = new []
            {
                new [] { "curve25519" },
                new [] { "P-256", "secp256r1", "prime256v1" },
                new [] { "P-384", "secp384r1" },
                new [] { "P-521", "secp521r1" }
            };

            sshCurveHeaders = new Dictionary <string, string>
            {
                { "curve25519", "ssh-ed25519" },
                { "P-256", "ecdsa-sha2-nistp256" },
                { "P-384", "ecdsa-sha2-nistp384" },
                { "P-521", "ecdsa-sha2-nistp521" }
            };

            sshCurveIdentifiers = new Dictionary <string, string>
            {
                { "curve25519", "ed25519" },
                { "P-256", "nistp256" },
                { "P-384", "nistp384" },
                { "P-521", "nistp521" }
            };
        }
コード例 #2
0
 public AsymmetricKeyProvider(OidToCipherTypeMapper cipherTypeMapper, KeyInfoWrapper keyInfoWrapper, IKeyProvider <RsaKey> rsaKeyProvider, IKeyProvider <DsaKey> dsaKeyProvider, IEcKeyProvider ecKeyProvider, IElGamalKeyProvider elGamalKeyProvider)
 {
     this.cipherTypeMapper   = cipherTypeMapper;
     this.rsaKeyProvider     = rsaKeyProvider;
     this.dsaKeyProvider     = dsaKeyProvider;
     this.ecKeyProvider      = ecKeyProvider;
     this.elGamalKeyProvider = elGamalKeyProvider;
     this.keyInfoWrapper     = keyInfoWrapper;
 }
コード例 #3
0
 public VerifyKeyPairCommandHandler(IKeyProvider <RsaKey> rsaKeyProvider, IKeyProvider <DsaKey> dsaKeyProvider, IEcKeyProvider ecKeyProvider)
 {
     this.rsaKeyProvider = rsaKeyProvider;
     this.dsaKeyProvider = dsaKeyProvider;
     this.ecKeyProvider  = ecKeyProvider;
 }
コード例 #4
0
 public CreateEcKeyCommandHandler(IEcKeyProvider keyProvider)
 {
     this.keyProvider = keyProvider;
 }
コード例 #5
0
 public EcSec1WriteFormattingDecorator(ICommandHandler <T> decoratedCommand, IEcKeyProvider ecKeyProvider)
 {
     this.decoratedCommand = decoratedCommand;
     this.ecKeyProvider    = ecKeyProvider;
 }
コード例 #6
0
 public EcPemFormattingProvider(IEcKeyProvider keyProvider)
 {
     this.keyProvider = keyProvider;
 }