@classmethod
def RegisterDecrypter(cls, decrypter):
    """Registers a decrypter for a specific encryption method.

    Args:
      decrypter (type): decrypter class.

    Raises:
      KeyError: if the corresponding decrypter is already set.
    """
    encryption_method = decrypter.ENCRYPTION_METHOD.lower()
    if encryption_method in cls._decrypters:
        raise KeyError('Decrypter for encryption method: {0:s} already set.'
            .format(decrypter.ENCRYPTION_METHOD))
    cls._decrypters[encryption_method] = decrypter
