'use strict'

/**
 * Module Depdendencies
 * @ignore
 */
const SupportedKeyTypes = require('./SupportedKeyTypes')
const RSA = require('./RSA')
const ECDSA = require('./ECDSA')
const EDDSA = require('./EDDSA')

/**
 * supportedKeyTypes
 * @ignore
 */
const supportedKeyTypes = new SupportedKeyTypes()

// RSA
supportedKeyTypes.define([
  {
    kty: 'RSA',
    oid: '1.2.840.113549.1.1.1',
    algParameters: '0500',
    version: 'two-prime',
  }
], RSA)

// ECDSA
supportedKeyTypes.define([
  {
    kty: 'EC',
    crv: 'K-256',
    oid: '1.2.840.10045.2.1',
    namedCurve: '1.3.132.0.10',
    algParameters: '06052b8104000a',
    keyVersion: 1,
    infoVersion: 'two-prime',
  },
  {
    kty: 'EC',
    crv: 'P-256',
    oid: '1.2.840.10045.2.1',
    namedCurve: '1.2.840.10045.3.1.7',
    algParameters: '06082a8648ce3d030107',
    keyVersion: 1,
    infoVersion: 'two-prime',
  },
  // {
  //   kty: 'EC',
  //   crv: 'P-384',
  //   oid: '',
  //   namedCurve: '',
  //   algParameters: '',
  //   keyVersion: 1,
  //   infoVersion: 'two-prime',
  // },
  // {
  //   kty: 'EC',
  //   crv: 'P-512',
  //   oid: '',
  //   namedCurve: '',
  //   algParameters: '',
  //   keyVersion: 1,
  //   infoVersion: 'two-prime',
  // },
], ECDSA)

// EDDSA
supportedKeyTypes.define([
], EDDSA)

/**
 * Export
 * @ignore
 */
module.exports = supportedKeyTypes

@@ -874,33 +874,27 @@
 me',%0A  %7D,%0A  
-// %7B%0A  //
+%7B%0A 
    kty: 'EC'
@@ -888,35 +888,32 @@
     kty: 'EC',%0A 
- //
    crv: 'P-384',
@@ -910,27 +910,24 @@
 : 'P-384',%0A 
- //
    oid: '',%0A
@@ -915,39 +915,53 @@
 384',%0A    oid: '
+1.2.840.10045.2.1
 ',%0A 
- //
    namedCurve: '
@@ -952,39 +952,48 @@
    namedCurve: '
+1.3.132.0.34
 ',%0A 
- //
    algParameters
@@ -987,39 +987,50 @@
 algParameters: '
+06052b81040022
 ',%0A 
- //
    keyVersion: 1
@@ -1024,35 +1024,32 @@
 keyVersion: 1,%0A 
- //
    infoVersion: 
@@ -1066,26 +1066,17 @@
 ',%0A 
- //
  %7D,%0A  
-// %7B%0A  //
+%7B%0A 
    k
@@ -1086,19 +1086,16 @@
  'EC',%0A 
- //
    crv: 
@@ -1104,19 +1104,16 @@
 -512',%0A 
- //
    oid: 
@@ -1113,23 +1113,37 @@
   oid: '
+1.2.840.10045.2.1
 ',%0A 
- //
    named
@@ -1150,23 +1150,32 @@
 Curve: '
+1.3.132.0.35
 ',%0A 
- //
    algPa
@@ -1185,23 +1185,34 @@
 eters: '
+06052b81040023
 ',%0A 
- //
    keyVe
@@ -1222,19 +1222,16 @@
 on: 1,%0A 
- //
    infoV
@@ -1256,11 +1256,8 @@
 ',%0A 
- //
  %7D,%0A

enable P384 and P512