encodeAlgorithmToInt static method

int encodeAlgorithmToInt(
  1. Algorithm a
)

Implementation

static int encodeAlgorithmToInt(Algorithm a) {
  switch (a) {
    case Algorithm.ECDH:
      return -25;
    case Algorithm.ES256:
      return -7;
    case Algorithm.ES384:
      return -35;
    case Algorithm.ES512:
      return -36;
    case Algorithm.PS256:
      return -37;
    case Algorithm.PS384:
      return -38;
    case Algorithm.PS512:
      return -39;
    case Algorithm.RS256:
      return -257;
    case Algorithm.RS384:
      return -258;
    case Algorithm.RS512:
      return -259;
    default:
      return -1;
  }
}