createEncrypter method

Encrypter<Key> createEncrypter(
  1. Identifier algorithm
)

Creates an Encrypter using this key and the specified algorithm

Implementation

Encrypter createEncrypter(Identifier algorithm) {
  if (this is SymmetricKey) {
    return _SymmetricEncrypter(algorithm, this as SymmetricKey);
  }

  return _AsymmetricEncrypter(algorithm, this);
}