id static method

int id(
  1. String name
)

Implementation

static int id(String name) {
  if (name == null) return 0;
  switch (name) {
    case 'curve25519-sha256@libssh.org':
      return ECDH_SHA2_X25519;
    case 'ecdh-sha2-nistp256':
      return ECDH_SHA2_NISTP256;
    case 'ecdh-sha2-nistp384':
      return ECDH_SHA2_NISTP384;
    case 'ecdh-sha2-nistp521':
      return ECDH_SHA2_NISTP521;
    case 'diffie-hellman-group-exchange-sha256':
      return DHGEX_SHA256;
    case 'diffie-hellman-group-exchange-sha1':
      return DHGEX_SHA1;
    case 'diffie-hellman-group14-sha1':
      return DH14_SHA1;
    case 'diffie-hellman-group1-sha1':
      return DH1_SHA1;
    default:
      return 0;
  }
}